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 1
1
<?php
2
2
3
- use AsyncAws \BedrockRuntime \BedrockRuntimeClient ;
4
3
use PhpLlm \LlmChain \Bridge \Anthropic \Claude ;
5
4
use PhpLlm \LlmChain \Bridge \Bedrock \PlatformFactory ;
6
5
use PhpLlm \LlmChain \Chain ;
17
16
exit (1 );
18
17
}
19
18
20
- $ platform = PlatformFactory::create (
21
- new BedrockRuntimeClient ()
22
- );
19
+ $ platform = PlatformFactory::create ();
23
20
$ llm = new Claude ();
24
21
25
22
$ chain = new Chain ($ platform , $ llm );
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- use AsyncAws \BedrockRuntime \BedrockRuntimeClient ;
4
3
use PhpLlm \LlmChain \Bridge \Bedrock \PlatformFactory ;
5
4
use PhpLlm \LlmChain \Bridge \Meta \Llama ;
6
5
use PhpLlm \LlmChain \Chain ;
17
16
exit (1 );
18
17
}
19
18
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 );
24
21
25
22
$ chain = new Chain ($ platform , $ llm );
26
23
$ messages = new MessageBag (
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- use AsyncAws \BedrockRuntime \BedrockRuntimeClient ;
4
3
use PhpLlm \LlmChain \Bridge \Bedrock \Nova \Nova ;
5
4
use PhpLlm \LlmChain \Bridge \Bedrock \PlatformFactory ;
6
5
use PhpLlm \LlmChain \Chain ;
17
16
exit (1 );
18
17
}
19
18
20
- $ platform = PlatformFactory::create (
21
- new BedrockRuntimeClient ()
22
- );
19
+ $ platform = PlatformFactory::create ();
23
20
$ llm = new Nova (Nova::PRO );
24
21
25
22
$ chain = new Chain ($ platform , $ llm );
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- use AsyncAws \BedrockRuntime \BedrockRuntimeClient ;
4
3
use PhpLlm \LlmChain \Bridge \Anthropic \Claude ;
5
4
use PhpLlm \LlmChain \Bridge \Bedrock \PlatformFactory ;
6
5
use PhpLlm \LlmChain \Chain ;
18
17
exit (1 );
19
18
}
20
19
21
- $ platform = PlatformFactory::create (
22
- new BedrockRuntimeClient ()
23
- );
20
+ $ platform = PlatformFactory::create ();
24
21
$ llm = new Claude ();
25
22
26
23
$ chain = new Chain ($ platform , $ llm );
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- use AsyncAws \BedrockRuntime \BedrockRuntimeClient ;
4
3
use PhpLlm \LlmChain \Bridge \Bedrock \Nova \Nova ;
5
4
use PhpLlm \LlmChain \Bridge \Bedrock \PlatformFactory ;
6
5
use PhpLlm \LlmChain \Chain ;
18
17
exit (1 );
19
18
}
20
19
21
- $ platform = PlatformFactory::create (
22
- new BedrockRuntimeClient ()
23
- );
20
+ $ platform = PlatformFactory::create ();
24
21
$ llm = new Nova (Nova::PRO );
25
22
26
23
$ chain = new Chain ($ platform , $ llm );
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- use AsyncAws \BedrockRuntime \BedrockRuntimeClient ;
4
3
use PhpLlm \LlmChain \Bridge \Anthropic \Claude ;
5
4
use PhpLlm \LlmChain \Bridge \Bedrock \PlatformFactory ;
6
5
use PhpLlm \LlmChain \Chain ;
21
20
exit (1 );
22
21
}
23
22
24
- $ platform = PlatformFactory::create (
25
- new BedrockRuntimeClient ()
26
- );
23
+ $ platform = PlatformFactory::create ();
27
24
$ llm = new Claude ();
28
25
29
26
$ wikipedia = new Wikipedia (HttpClient::create ());
Original file line number Diff line number Diff line change 12
12
final readonly class PlatformFactory
13
13
{
14
14
public static function create (
15
- ? BedrockRuntimeClient $ bedrockRuntimeClient = null ,
15
+ BedrockRuntimeClient $ bedrockRuntimeClient = new BedrockRuntimeClient () ,
16
16
): Platform {
17
17
$ modelClient [] = new ClaudeHandler ($ bedrockRuntimeClient );
18
18
$ modelClient [] = new NovaHandler ($ bedrockRuntimeClient );
You can’t perform that action at this time.
0 commit comments