Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI API Streaming Examples

Streaming examples for OpenAI-compatible chat completions with OriginStartAI.

Use this repo when your app needs visible token-by-token progress, lower perceived latency, or a better chat typing experience.

Fast Path

  1. Create an account: https://originstartai.com?utm_source=github&utm_medium=repo&utm_campaign=github_secondary_repos&utm_content=ai-api-streaming-examples
  2. Get an API key from the console.
  3. Copy .env.example to .env.
  4. Set ORIGINSTARTAI_API_KEY, ORIGINSTARTAI_BASE_URL, and ORIGINSTARTAI_MODEL.
  5. Run one of the streaming examples.

New user offer: recharge $5 and get $5 extra API credits.

Curl

bash examples/curl/streaming.sh

Python

pip install openai python-dotenv
python examples/python/streaming.py

Node.js

npm install
npm run stream

Related

Releases

Packages

Contributors