DEV Community

El Bruno for Microsoft Azure

Posted on • Originally published at elbruno.com on

#Rust 🦀 – Using #OpenAI ChatGPT APIs from Rust. Demo Chat console App

Hi!

Let’s look at my sample repository on how to use OpenAI APIs in Rust. I added a new scenario: a sample console chat app that uses the new ChatGPT APIs model.

The process is remarkably similar to the text completion scenario, including a major change in the model used. Instead of davinci-003, we use the new gpt-3.5-turbo model.

This is a sample response this model in a sample chat app Sample:

This sample does not implement a multi-turn conversations model. Right now, the sample is a single-turn Q&A without any conversations. I’ll implement a multi-turn conversations model in the future.

Happy coding!

Greetings

El Bruno

More posts in my blog ElBruno.com.

More info in https://beacons.ai/elbruno


Top comments (0)