Skip to main content

call_openai_stream

Function call_openai_stream 

Source
pub fn call_openai_stream(
    provider: &ModelProvider,
    messages: &[ChatMessage],
    on_chunk: &mut dyn FnMut(&str),
) -> Result<String, String>
Expand description

同步包装:创建 tokio runtime 执行异步流式调用