Skip to content

Commit 0b388e1

Browse files
fix linting
1 parent 4e92c82 commit 0b388e1

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

  • examples/zero-code-examples/anthropic

examples/zero-code-examples/anthropic/run.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@
4040
"description": "Roll a single die with the given number of sides and return the result.",
4141
"input_schema": {
4242
"type": "object",
43-
"properties": {
44-
"n_sides": {"type": "integer", "description": "Number of sides on the die."}
45-
},
43+
"properties": {"n_sides": {"type": "integer", "description": "Number of sides on the die."}},
4644
"required": ["n_sides"],
4745
},
4846
},
@@ -51,9 +49,7 @@
5149
"description": "Return true if the given number is prime, false otherwise.",
5250
"input_schema": {
5351
"type": "object",
54-
"properties": {
55-
"number": {"type": "integer", "description": "The number to check."}
56-
},
52+
"properties": {"number": {"type": "integer", "description": "The number to check."}},
5753
"required": ["number"],
5854
},
5955
},
@@ -99,9 +95,7 @@ def run_agent(client: anthropic.Anthropic, query: str) -> str:
9995
result = check_prime(**block.input)
10096
else:
10197
result = "Unknown tool"
102-
tool_results.append(
103-
{"type": "tool_result", "tool_use_id": block.id, "content": json.dumps(result)}
104-
)
98+
tool_results.append({"type": "tool_result", "tool_use_id": block.id, "content": json.dumps(result)})
10599

106100
messages.append({"role": "assistant", "content": response.content})
107101
messages.append({"role": "user", "content": tool_results})

0 commit comments

Comments
 (0)