Skip to main content
Glama
streaming_smoke_tool.py610 B
from __future__ import annotations from typing import Optional from streaming.streaming_adapter import ( MoonshotStreamingAdapter, ZaiStreamingAdapter, ) async def get_stream_first_chunk(provider: str, prompt: str) -> Optional[str]: """Return the first streamed chunk for a prompt using the provider adapter. This is an MVP smoke-tool to exercise the streaming path from within tools/. """ adapter = MoonshotStreamingAdapter() if provider == "moonshot" else ZaiStreamingAdapter() async for chunk in adapter.iter_stream({"prompt": prompt}): return chunk return None

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Zazzles2908/EX_AI-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server