Skip to main content

Crate deepseek_recipe

Crate deepseek_recipe 

Source
Expand description

API protocol conversion and inference output parsing.

request::ProtocolRequest::convert produces a shared request::ConversationRequest. stream::StreamProcessor parses backend output, passes it to the selected protocol’s chunk generator (stream::ChunkGenerator), and accumulates completion usage. The caller renders and encodes the prompt, supplies the backend and its prompt usage, and transports the protocol responses.

Modules§

anthropic
Anthropic-compatible protocol types and conversion.
error_response
Error response bodies for conversion errors.
openai
request
Shared request data and the conversion contract for protocol adapters.
response
Protocol response construction and chunk accumulation.
stream
Parse model output and turn it into protocol response chunks.