You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This builds a `dioxus` web App that uses OpenAI Assistant APIs to generate text.
4
+
5
+
To run it, you need:
6
+
1. Set OpenAI secrets in `./src/main.rs`. Please do NOT take this demo into production without using a secure secret store
7
+
2. Install `dioxus-cli` by `cargo install dioxus-cli`.
8
+
3. Run `dx serve`
9
+
10
+
Note: Safari may not work due to CORS issues. Please use Chrome or Edge.
11
+
12
+
## Reference
13
+
14
+
The code is adapted from [assistant-func-call-stream example in async-openai](https://github.com/64bit/async-openai/tree/main/examples/assistants-func-call-stream).
use async_openai_wasm::types::{AssistantStreamEvent,CreateAssistantRequest,CreateAssistantRequestArgs,FunctionObject,MessageDeltaContent,RunObject,SubmitToolOutputsRunRequest,ToolsOutputs};
0 commit comments