Skip to main content

Module api

Module api 

Source

Functions§

call_openai_stream
同步包装:创建 tokio runtime 执行异步流式调用
call_openai_stream_async
使用 async-openai 流式调用 API,通过回调逐步输出 返回完整的助手回复内容
create_openai_client
根据 ModelProvider 配置创建 async-openai Client
to_openai_messages
将内部 ChatMessage 转换为 async-openai 的请求消息格式