Skip to content

Commit

Permalink
Merge branch 'dev' into f/better-validation-error
Browse files Browse the repository at this point in the history
  • Loading branch information
Vedantsahai18 committed Nov 2, 2024
2 parents b8f0596 + cbdd3e8 commit 8acd08b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion agents-api/agents_api/activities/task_steps/prompt_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,19 @@ async def prompt_step(context: StepContext) -> StepOutcome:
# Anthropic expects a list of messages with role and content (and no name etc)
prompt = [{"role": "user", "content": message["content"]} for message in prompt]

# Filter tools for specific types
filtered_tools = [
tool
for tool in formatted_tools
if tool["type"]
in ["computer_20241022", "bash_20241022", "text_editor_20241022"]
]

# Claude Response
claude_response: BetaMessage = await client.beta.messages.create(
model="claude-3-5-sonnet-20241022",
messages=prompt,
tools=formatted_tools,
tools=filtered_tools,
max_tokens=1024,
betas=betas,
)
Expand Down

0 comments on commit 8acd08b

Please sign in to comment.