DEV Community

El Bruno for Microsoft Azure

Posted on • Originally published at elbruno.com on

1

#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


Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs