async-openai
async-openai copied to clipboard
Rust library for OpenAI
I want to deserialize request json to `CreateChatCompletionRequest` but i found the messages are all System. code ```rust use async_openai::types::{ ChatCompletionRequestSystemMessageArgs, ChatCompletionRequestUserMessageArgs, CreateChatCompletionRequest, CreateChatCompletionRequestArgs, }; fn main() -> Result {...
When a function inserted in CreateRunRequest.tools, the tool of the RunObject is: AssistantTools::Code(AssistantToolsCode { type: "function" }) . I assume it be AssistantTools::Function(AssistantToolsFunction). Could you help give some hints? Thanks.
Wasm support
Thanks for making this crate, it seems very useful :) Currently the crate always depends on e.g. tokio which means it can't be compiled to wasm for use in frontends...
Running the example at https://github.com/64bit/async-openai/blob/532a60f63b679e14a1eb37a907e357c083a48c99/examples/assistants/src/main.rs results in the error below. Adding a few `.context(...)` helped me to narrow it down to the call to create a thread: ```rust let thread...
Would like to enable something like this: ```rust fn use_client(client: Box) { // You can now call any method defined in the CommonClientTrait on the client let models = client.models();...
This is an attempt to solve #106. This removes generics of `Client` and use ~Rc~ Arc trait objects to do dynamic dispatch. Breaking changes: 1. The type of `Client` is...
Why do I execute one function every time and not multiple functions? `let request = CreateChatCompletionRequestArgs::default()` ` .max_tokens(512u16)` ` .model("gpt-3.5-turbo-0125")` ` .messages("Can you tell me which doctors will be available...
Hi! Do you have any plans to support [streaming the responses from assistants](https://platform.openai.com/docs/assistants/overview/step-4-create-a-run?context=with-streaming)? Thanks!
Hi, I'm attempting to translate audio directly into English ([API](https://platform.openai.com/docs/guides/speech-to-text/translations)). When I set the `response_format` to `Json`, everything works correctly. However, when setting the `response_format` to `Srt` I encounter the...
When the prompt includes non-ASCII characters, OpenAI needs to be correctly escaped to respond accurately.