mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-26 07:24:18 +02:00
Adopt snake_case SDK type constructor kwargs
This commit is contained in:
parent
ed85d477f5
commit
2ea012ead4
50 changed files with 283 additions and 281 deletions
|
|
@ -42,7 +42,7 @@ class TestAutomaticToolLoop:
|
|||
)
|
||||
],
|
||||
model="test-model",
|
||||
stopReason="toolUse",
|
||||
stop_reason="toolUse",
|
||||
)
|
||||
else:
|
||||
# Second call: return final response
|
||||
|
|
@ -50,7 +50,7 @@ class TestAutomaticToolLoop:
|
|||
role="assistant",
|
||||
content=[TextContent(type="text", text="The weather is sunny!")],
|
||||
model="test-model",
|
||||
stopReason="endTurn",
|
||||
stop_reason="endTurn",
|
||||
)
|
||||
|
||||
mcp = FastMCP(sampling_handler=sampling_handler)
|
||||
|
|
@ -110,14 +110,14 @@ class TestAutomaticToolLoop:
|
|||
),
|
||||
],
|
||||
model="test-model",
|
||||
stopReason="toolUse",
|
||||
stop_reason="toolUse",
|
||||
)
|
||||
else:
|
||||
return CreateMessageResultWithTools(
|
||||
role="assistant",
|
||||
content=[TextContent(type="text", text="Done!")],
|
||||
model="test-model",
|
||||
stopReason="endTurn",
|
||||
stop_reason="endTurn",
|
||||
)
|
||||
|
||||
mcp = FastMCP(sampling_handler=sampling_handler)
|
||||
|
|
@ -165,14 +165,14 @@ class TestAutomaticToolLoop:
|
|||
)
|
||||
],
|
||||
model="test-model",
|
||||
stopReason="toolUse",
|
||||
stop_reason="toolUse",
|
||||
)
|
||||
else:
|
||||
return CreateMessageResultWithTools(
|
||||
role="assistant",
|
||||
content=[TextContent(type="text", text="Handled error")],
|
||||
model="test-model",
|
||||
stopReason="endTurn",
|
||||
stop_reason="endTurn",
|
||||
)
|
||||
|
||||
mcp = FastMCP(sampling_handler=sampling_handler)
|
||||
|
|
@ -239,14 +239,14 @@ class TestAutomaticToolLoop:
|
|||
)
|
||||
],
|
||||
model="test-model",
|
||||
stopReason="toolUse",
|
||||
stop_reason="toolUse",
|
||||
)
|
||||
else:
|
||||
return CreateMessageResultWithTools(
|
||||
role="assistant",
|
||||
content=[TextContent(type="text", text="Handled error")],
|
||||
model="test-model",
|
||||
stopReason="endTurn",
|
||||
stop_reason="endTurn",
|
||||
)
|
||||
|
||||
mcp = FastMCP(sampling_handler=sampling_handler)
|
||||
|
|
@ -333,14 +333,14 @@ class TestAutomaticToolLoop:
|
|||
),
|
||||
],
|
||||
model="test-model",
|
||||
stopReason="toolUse",
|
||||
stop_reason="toolUse",
|
||||
)
|
||||
else:
|
||||
return CreateMessageResultWithTools(
|
||||
role="assistant",
|
||||
content=[TextContent(type="text", text="Done!")],
|
||||
model="test-model",
|
||||
stopReason="endTurn",
|
||||
stop_reason="endTurn",
|
||||
)
|
||||
|
||||
mcp = FastMCP(sampling_handler=sampling_handler)
|
||||
|
|
@ -411,14 +411,14 @@ class TestAutomaticToolLoop:
|
|||
),
|
||||
],
|
||||
model="test-model",
|
||||
stopReason="toolUse",
|
||||
stop_reason="toolUse",
|
||||
)
|
||||
else:
|
||||
return CreateMessageResultWithTools(
|
||||
role="assistant",
|
||||
content=[TextContent(type="text", text="Done!")],
|
||||
model="test-model",
|
||||
stopReason="endTurn",
|
||||
stop_reason="endTurn",
|
||||
)
|
||||
|
||||
mcp = FastMCP(sampling_handler=sampling_handler)
|
||||
|
|
@ -491,14 +491,14 @@ class TestAutomaticToolLoop:
|
|||
),
|
||||
],
|
||||
model="test-model",
|
||||
stopReason="toolUse",
|
||||
stop_reason="toolUse",
|
||||
)
|
||||
else:
|
||||
return CreateMessageResultWithTools(
|
||||
role="assistant",
|
||||
content=[TextContent(type="text", text="Done!")],
|
||||
model="test-model",
|
||||
stopReason="endTurn",
|
||||
stop_reason="endTurn",
|
||||
)
|
||||
|
||||
mcp = FastMCP(sampling_handler=sampling_handler)
|
||||
|
|
@ -577,14 +577,14 @@ class TestAutomaticToolLoop:
|
|||
),
|
||||
],
|
||||
model="test-model",
|
||||
stopReason="toolUse",
|
||||
stop_reason="toolUse",
|
||||
)
|
||||
else:
|
||||
return CreateMessageResultWithTools(
|
||||
role="assistant",
|
||||
content=[TextContent(type="text", text="Done!")],
|
||||
model="test-model",
|
||||
stopReason="endTurn",
|
||||
stop_reason="endTurn",
|
||||
)
|
||||
|
||||
mcp = FastMCP(sampling_handler=sampling_handler)
|
||||
|
|
@ -651,14 +651,14 @@ class TestAutomaticToolLoop:
|
|||
),
|
||||
],
|
||||
model="test-model",
|
||||
stopReason="toolUse",
|
||||
stop_reason="toolUse",
|
||||
)
|
||||
else:
|
||||
return CreateMessageResultWithTools(
|
||||
role="assistant",
|
||||
content=[TextContent(type="text", text="Handled errors")],
|
||||
model="test-model",
|
||||
stopReason="endTurn",
|
||||
stop_reason="endTurn",
|
||||
)
|
||||
|
||||
mcp = FastMCP(sampling_handler=sampling_handler)
|
||||
|
|
@ -732,14 +732,14 @@ class TestAutomaticToolLoop:
|
|||
),
|
||||
],
|
||||
model="test-model",
|
||||
stopReason="toolUse",
|
||||
stop_reason="toolUse",
|
||||
)
|
||||
else:
|
||||
return CreateMessageResultWithTools(
|
||||
role="assistant",
|
||||
content=[TextContent(type="text", text="Done!")],
|
||||
model="test-model",
|
||||
stopReason="endTurn",
|
||||
stop_reason="endTurn",
|
||||
)
|
||||
|
||||
mcp = FastMCP(sampling_handler=sampling_handler)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue