Adds SSE (Server-Sent Events) Support#140
Conversation
|
Really nice PR! Personally I would love mummy to support it. Have you tested or set up a real MCP server with "tools" using the code in PR? |
|
I've not tested or set up an MCP server. However, I'm making a multi-provider inference relay with tools and vision support and conversion between all provider formats, and it works already (with the above PR code) for several of the providers: OpenAI (& DeepSeek variant), Anthropic, Github Copilot, Ollama, Gemini. So I point my local tool like VSCode or Claude Code at the local relay server, and it proxies some other service such as ChatGPT. It's like Claude Code Router but more flexible and a single binary. Cohere format is what I'm working on now as it is the odd one out having non-standard SSE without 'data: ' prefix. I'm curious if you have opinions on the SSEEvent / SSEEventRaw solution? |
|
@ThomasTJdev Curious what you needed that wasn't in mummyx for MCP? I Implemented what I suggested earlier.
I'm unsure if the raw event would benefit from My in-progress project now fully utilizes both of these and the code is cleaner now. |
|
I got an email from another nim user attempting SSE with mummyx. They're now using this branch and their code is working and they're asking me to update the branch with examples. I'd rather help maintain mummy than maintain my own fork. Perhaps:
|
Stress-Testing
Potential Opinion Points
SSEEventandSSERawEventnow implemented on this PR.We could have 2 different Objects:SSEEventandSSEEventRawso folks who want an automatic 'data :' prefix can have it, and those who don't can have theirs.SSEEventprefixes event stream chunks with'data: 'as normalSSERawEventdoes not - useful for NDJSON format and others.