This repository was archived by the owner on Jul 16, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +8
-26
lines changed Expand file tree Collapse file tree 7 files changed +8
-26
lines changed Original file line number Diff line number Diff line change 11<?php
22
3- use AsyncAws \BedrockRuntime \BedrockRuntimeClient ;
43use PhpLlm \LlmChain \Bridge \Anthropic \Claude ;
54use PhpLlm \LlmChain \Bridge \Bedrock \PlatformFactory ;
65use PhpLlm \LlmChain \Chain ;
1716 exit (1 );
1817}
1918
20- $ platform = PlatformFactory::create (
21- new BedrockRuntimeClient ()
22- );
19+ $ platform = PlatformFactory::create ();
2320$ llm = new Claude ();
2421
2522$ chain = new Chain ($ platform , $ llm );
Original file line number Diff line number Diff line change 11<?php
22
3- use AsyncAws \BedrockRuntime \BedrockRuntimeClient ;
43use PhpLlm \LlmChain \Bridge \Bedrock \PlatformFactory ;
54use PhpLlm \LlmChain \Bridge \Meta \Llama ;
65use PhpLlm \LlmChain \Chain ;
1716 exit (1 );
1817}
1918
20- $ platform = PlatformFactory::create (
21- new BedrockRuntimeClient ()
22- );
23- $ llm = new Llama ('llama-3.2-3b-instruct ' );
19+ $ platform = PlatformFactory::create ();
20+ $ llm = new Llama (Llama::V3_2_3B_INSTRUCT );
2421
2522$ chain = new Chain ($ platform , $ llm );
2623$ messages = new MessageBag (
Original file line number Diff line number Diff line change 11<?php
22
3- use AsyncAws \BedrockRuntime \BedrockRuntimeClient ;
43use PhpLlm \LlmChain \Bridge \Bedrock \Nova \Nova ;
54use PhpLlm \LlmChain \Bridge \Bedrock \PlatformFactory ;
65use PhpLlm \LlmChain \Chain ;
1716 exit (1 );
1817}
1918
20- $ platform = PlatformFactory::create (
21- new BedrockRuntimeClient ()
22- );
19+ $ platform = PlatformFactory::create ();
2320$ llm = new Nova (Nova::PRO );
2421
2522$ chain = new Chain ($ platform , $ llm );
Original file line number Diff line number Diff line change 11<?php
22
3- use AsyncAws \BedrockRuntime \BedrockRuntimeClient ;
43use PhpLlm \LlmChain \Bridge \Anthropic \Claude ;
54use PhpLlm \LlmChain \Bridge \Bedrock \PlatformFactory ;
65use PhpLlm \LlmChain \Chain ;
1817 exit (1 );
1918}
2019
21- $ platform = PlatformFactory::create (
22- new BedrockRuntimeClient ()
23- );
20+ $ platform = PlatformFactory::create ();
2421$ llm = new Claude ();
2522
2623$ chain = new Chain ($ platform , $ llm );
Original file line number Diff line number Diff line change 11<?php
22
3- use AsyncAws \BedrockRuntime \BedrockRuntimeClient ;
43use PhpLlm \LlmChain \Bridge \Bedrock \Nova \Nova ;
54use PhpLlm \LlmChain \Bridge \Bedrock \PlatformFactory ;
65use PhpLlm \LlmChain \Chain ;
1817 exit (1 );
1918}
2019
21- $ platform = PlatformFactory::create (
22- new BedrockRuntimeClient ()
23- );
20+ $ platform = PlatformFactory::create ();
2421$ llm = new Nova (Nova::PRO );
2522
2623$ chain = new Chain ($ platform , $ llm );
Original file line number Diff line number Diff line change 11<?php
22
3- use AsyncAws \BedrockRuntime \BedrockRuntimeClient ;
43use PhpLlm \LlmChain \Bridge \Anthropic \Claude ;
54use PhpLlm \LlmChain \Bridge \Bedrock \PlatformFactory ;
65use PhpLlm \LlmChain \Chain ;
2120 exit (1 );
2221}
2322
24- $ platform = PlatformFactory::create (
25- new BedrockRuntimeClient ()
26- );
23+ $ platform = PlatformFactory::create ();
2724$ llm = new Claude ();
2825
2926$ wikipedia = new Wikipedia (HttpClient::create ());
Original file line number Diff line number Diff line change 1212final readonly class PlatformFactory
1313{
1414 public static function create (
15- ? BedrockRuntimeClient $ bedrockRuntimeClient = null ,
15+ BedrockRuntimeClient $ bedrockRuntimeClient = new BedrockRuntimeClient () ,
1616 ): Platform {
1717 $ modelClient [] = new ClaudeHandler ($ bedrockRuntimeClient );
1818 $ modelClient [] = new NovaHandler ($ bedrockRuntimeClient );
You can’t perform that action at this time.
0 commit comments