From dfac622748dde5d02c65f6b544079dbce237000e Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Mon, 17 Mar 2025 10:27:40 -0500 Subject: [PATCH] Add `php-llm/llm-chain-bundle` (#1762) * Add recipe for php-llm/llm-chain-bundle * Update manifest.json * Use null instead of ~ --------- Co-authored-by: Fabien Potencier --- .../0.16/config/packages/llm_chain.yaml | 23 +++++++++++++++++++ php-llm/llm-chain-bundle/0.16/manifest.json | 11 +++++++++ 2 files changed, 34 insertions(+) create mode 100644 php-llm/llm-chain-bundle/0.16/config/packages/llm_chain.yaml create mode 100644 php-llm/llm-chain-bundle/0.16/manifest.json diff --git a/php-llm/llm-chain-bundle/0.16/config/packages/llm_chain.yaml b/php-llm/llm-chain-bundle/0.16/config/packages/llm_chain.yaml new file mode 100644 index 00000000..71615de9 --- /dev/null +++ b/php-llm/llm-chain-bundle/0.16/config/packages/llm_chain.yaml @@ -0,0 +1,23 @@ +# config/packages/llm_chain.yaml +services: + _defaults: + autowire: true + autoconfigure: true + + PhpLlm\LlmChain\Chain\ToolBox\Tool\Clock: null + +llm_chain: + platform: + openai: + api_key: '%env(OPENAI_API_KEY)%' + + chain: + default: + platform: 'llm_chain.platform.openai' + model: + name: 'GPT' + version: 'gpt-4o-mini' + system_prompt: | + You are a helpful assistant and you can provide the current date and time. + tools: + - 'PhpLlm\LlmChain\Chain\ToolBox\Tool\Clock' diff --git a/php-llm/llm-chain-bundle/0.16/manifest.json b/php-llm/llm-chain-bundle/0.16/manifest.json new file mode 100644 index 00000000..23505185 --- /dev/null +++ b/php-llm/llm-chain-bundle/0.16/manifest.json @@ -0,0 +1,11 @@ +{ + "bundles": { + "PhpLlm\\LlmChainBundle\\LlmChainBundle": ["all"] + }, + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" + }, + "env": { + "OPENAI_API_KEY": "" + } +}