Starlord
Starlord4w ago

Where Actions can be called

actions can be only called by client? https://docs.convex.dev/functions/actions
Actions | Convex Developer Hub
Actions can call third party services to do things such as processing a payment
6 Replies
jamwt
jamwt4w ago
Well, they can be scheduled on the server with ctx.scheduler.* -- is there something else you had in mind? you can also call one action from another with ctx.runAction -- though you usually shouldn't, you should just call a regular shared typescript function instead
Starlord
StarlordOP4w ago
basically there is mutation that is called by client (create order). this should call external api and return url to client dont see way to make it synchronously
Starlord
StarlordOP4w ago
Thanks what is the best way to inform client about external api response? Save it to the database? This is also limitation i would like to know how to stream response from for example openAI to the client. With backend like express possible just to stream it to the client
ian
ian4w ago
AI Chat with HTTP Streaming
By leveraging HTTP actions with streaming, this chat app balances real-time responsiveness with efficient bandwidth usage. Users receive character-by-...
GPT Streaming With Persistent Reactivity
Stream GPT responses without brittle browser-based HTTP streaming. Multiplayer reactivity, persistence, reactivity via Convex. Using OpenAI’s Node SDK...
Streaming HTTP Responses using fetch
Learn the basics of HTTP streaming with Convex by re-implementing OpenAI's SDK using built-in fetch and async iterators. No npm dependencies needed.
Starlord
StarlordOP4w ago
Thank you

Did you find this page helpful?