64bit / async-openai

Rust library for OpenAI
https://docs.rs/async-openai
MIT License
1.11k stars 165 forks source link

Ollama AI Chat Completion Example / OpenAI Compatibility #191

Open 64bit opened 7 months ago

64bit commented 7 months ago

Given that officially Chat completion API is compatibale - this library should work without any changes. Hence it would be great to have a fully self contained example which works with local ollama using this crate

https://ollama.com/blog/openai-compatibility

jacksongoode commented 6 months ago

This would be great, is it just a matter of switching the endpoint?

64bit commented 6 months ago

I do not know :) hence this example calls for self contained - so that it works out of the box and answer(s) the question(s) like that :)

jacksongoode commented 6 months ago

I'll give it a shot!