8000 feat: add Llama API as model provider (#11) · Clever-Boy/sdk-python@a99107f · GitHub
[go: up one dir, main page]

Skip to content

Commit a99107f

Browse files
yanxi0830Xi Yan
andauthored
feat: add Llama API as model provider (strands-agents#11)
* add llama api * fix tests * fix lint * imports * refactor --------- Co-authored-by: Xi Yan <xiyan@Mac.attlocal.net>
1 parent b213e34 commit a99107f

File tree

6 files changed

+783
-3
lines changed

6 files changed

+783
-3
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ Support for various model providers:
9999
from strands import Agent
100100
from strands.models import BedrockModel
101101
from strands.models.ollama import OllamaModel
102+
from strands.models.llamaapi import LlamaAPIModel
102103

103104
# Bedrock
104105
bedrock_model = BedrockModel(
@@ -115,6 +116,13 @@ ollama_modal = OllamaModel(
115116
)
116117
agent = Agent(model=ollama_modal)
117118
agent("Tell me about Agentic AI")
119+
120+
# Llama API
121+
llama_model = LlamaAPIModel(
122+
model_id="Llama-4-Maverick-17B-128E-Instruct-FP8",
123+
)
124+
agent = Agent(model=llama_model)
125+
response = agent("Tell me about Agentic AI")
118126
```
119127

120128
Built-in providers:

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,12 @@ litellm = [
7272
ollama = [
7373
"ollama>=0.4.8,<1.0.0",
7474
]
75+
llamaapi = [
76+
"llama-api-client>=0.1.0,<1.0.0",
77+
]
7578

7679
[tool.hatch.envs.hatch-static-analysis]
77-
features = ["anthropic", "litellm", "ollama"]
80+
features = ["anthropic", "litellm", "llamaapi", "ollama"]
7881
dependencies = [
7982
"mypy>=1.15.0,<2.0.0",
8083
"ruff>=0.11.6,<0.12.0",
@@ -97,7 +100,7 @@ lint-fix = [
97100
]
98101

99102
[tool.hatch.envs.hatch-test]
100-
features = ["anthropic", "litellm", "ollama"]
103+
features = ["anthropic", "litellm", "llamaapi", "ollama"]
101104
extra-dependencies = [
102105
"moto>=5.1.0,<6.0.0",
103106
"pytest>=8.0.0,<9.0.0",

0 commit comments

Comments
 (0)
0