-
Notifications
You must be signed in to change notification settings - Fork 31
genai-function-calling: Adds MCP example to openai-agents #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
codefromthecrypt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mind doing stdio so that the impl matches the flow?
|
|
||
| For example, to run with Docker: | ||
| ```bash | ||
| docker compose run --build --rm genai-function-calling -- --mcp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think..
| docker compose run --build --rm genai-function-calling -- --mcp | |
| docker compose run --build --rm genai-function-calling --mcp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops yeah just copied this from vercel-ai without testing it. I think it may need the CMD -> ENTRYPOINT change
| @@ -1,5 +1,6 @@ | |||
| openai-agents~=0.0.8 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mind checking latest doesn't break this?
Co-authored-by: Adrian Cole <[email protected]>
codefromthecrypt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I think this demonstrates that SSE is worse than stdio wrt the propagation concern. We can still merge it, but I'd go back and try to change it to stdio later. We should take the lessons about SSE with us as we progress MCP propagation.
SG?
| mcp_server = FastMCP(log_level="WARNING") | ||
| for tool in tools: | ||
| mcp_server.add_tool(tool) | ||
| # Mysteriously, cleanup such as from opentelemetry-instrument does not run on exit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry absolutely no clue what's going on here
|
Went ahead and switched to stdio |
codefromthecrypt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great job with pragmatic workarounds!
Same implementation as vercel-ai