@devries-cameron20 / composio Mirror · read-only / commits / 5a001ef13
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 22, 05:45 UTC

docs: include Pydantic models in FastAPI region snippets

Move ChatRequest into #chat region and ConnectRequest into #connect region so developers see the model definitions in tutorial snippets. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Sushmitha Mallesh committed Feb 25, 2026 at 18:09 UTC 5a001ef13caafdc4f1ec8fc603deada40d6f3dea
1 file changed +5 -5
docs/examples/fast-api/main.py
+5 -5
@@ -11,16 +11,12 @@ app = FastAPI()
11 # endregion setup
12
13
14 +# region chat
15 class ChatRequest(BaseModel):
16 user_id: str
17 message: str
18
19
19 -class ConnectRequest(BaseModel):
20 - user_id: str
21 -
22 -
23 -# region chat
20 @app.post("/chat")
21 def chat(request: ChatRequest):
22 """Send a message to an AI agent with access to all tools."""
@@ -65,6 +61,10 @@ def check_connection(user_id: str, toolkit: str):
61
62
63 # region connect
64 +class ConnectRequest(BaseModel):
65 + user_id: str
66 +
67 +
68 @app.post("/connect/{toolkit}")
69 def connect_toolkit(toolkit: str, request: ConnectRequest):
70 """Start OAuth for a toolkit. Returns a URL to redirect the user to."""