Expand setup docs and add runnable examples#12
Conversation
There was a problem hiding this comment.
💡 Codex Review
Lines 140 to 144 in 9f07d9a
The new setup walkthrough shows sample requests sending x-flowdex-api-key, but the FastAPI dependency require_api_key reads the X-API-Key header (x_api_key parameter). Anyone who copies these examples while setting FLOWDEX_API_KEY will always receive 401 responses because the API never sees the provided key. The header name in the docs should match what the server actually checks.
FlowDex/examples/tool_router.py
Lines 44 to 47 in 9f07d9a
The runnable examples build the request body with an inputs object containing user, context, and tool_hints, but the /infer endpoint expects these fields at the top level (user_input, context_ids, tool_candidates). Pydantic will drop the nested data, so the server receives empty strings and cannot apply the provided context or tool hints. The sample payload should use the actual field names or the script will return meaningless results. The README and notebook examples use the same incorrect structure.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68fafb80ce4483318a3cae4ca071aa60