Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ from strands import Agent
from strands.models import BedrockModel
from strands.models.ollama import OllamaModel
from strands.models.llamaapi import LlamaAPIModel
from strands.models.portkey import PortkeyModel

# Bedrock
bedrock_model = BedrockModel(
Expand All @@ -142,6 +143,17 @@ llama_model = LlamaAPIModel(
)
agent = Agent(model=llama_model)
response = agent("Tell me about Agentic AI")

# Portkey for all models
portkey_model = PortkeyModel(
api_key="<PORTKEY_API_KEY>",
model_id="anthropic.claude-3-5-sonnet-20241022-v2:0",
virtual_key="<BEDROCK_VIRTUAL_KEY>",
provider="bedrock",
base_url="http://portkey-service-gateway.service.prod.example.com/v1",
)
agent = Agent(model=portkey_model)
response = agent("Tell me about Agentic AI")
```

Built-in providers:
Expand Down
13 changes: 10 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ packages = ["src/strands"]
anthropic = [
"anthropic>=0.21.0,<1.0.0",
]
# Optional dependencies for different AI providers

dev = [
"commitizen>=4.4.0,<5.0.0",
"hatch>=1.0.0,<2.0.0",
Expand Down Expand Up @@ -88,12 +90,17 @@ a2a = [
"starlette>=0.46.2",
]

portkey = [
"portkey-ai>=1.0.0,<2.0.0",
]

[tool.hatch.version]
# Tells Hatch to use your version control system (git) to determine the version.
source = "vcs"

[tool.hatch.envs.hatch-static-analysis]
features = ["anthropic", "litellm", "llamaapi", "ollama", "openai", "otel"]
features = ["anthropic", "litellm", "llamaapi", "ollama", "openai","otel", "portkey"]

dependencies = [
"mypy>=1.15.0,<2.0.0",
"ruff>=0.11.6,<0.12.0",
Expand All @@ -116,7 +123,7 @@ lint-fix = [
]

[tool.hatch.envs.hatch-test]
features = ["anthropic", "litellm", "llamaapi", "ollama", "openai", "otel"]
features = ["anthropic", "litellm", "llamaapi", "ollama", "openai", "otel", "portkey"]
extra-dependencies = [
"moto>=5.1.0,<6.0.0",
"pytest>=8.0.0,<9.0.0",
Expand All @@ -132,7 +139,7 @@ extra-args = [

[tool.hatch.envs.dev]
dev-mode = true
features = ["dev", "docs", "anthropic", "litellm", "llamaapi", "ollama", "otel"]
features = ["dev", "docs", "anthropic", "litellm", "llamaapi", "ollama", "otel,", "portkey"]

[tool.hatch.envs.a2a]
dev-mode = true
Expand Down
Loading