Skip to main content
Glama
streaming_adapter.py832 B
from __future__ import annotations from typing import AsyncIterator, Dict, Any class StreamingAdapter: """Minimal streaming adapter interface (Phase E MVP). Concrete adapters should wrap provider streaming APIs and yield token/text chunks. """ async def iter_stream(self, request: Dict[str, Any]) -> AsyncIterator[str]: # pragma: no cover yield "" class MoonshotStreamingAdapter(StreamingAdapter): async def iter_stream(self, request: Dict[str, Any]) -> AsyncIterator[str]: # Placeholder: yield a single chunk for now yield request.get("prompt", "")[:50] class ZaiStreamingAdapter(StreamingAdapter): async def iter_stream(self, request: Dict[str, Any]) -> AsyncIterator[str]: # Placeholder: yield a single chunk for now yield request.get("prompt", "")[:50]

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