64bit / async-openai

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

Add vision-chat example #203

Closed Gabriel2409 closed 5 months ago

Gabriel2409 commented 5 months ago

The example directory currently lacks an example that matches the quickstart from https://platform.openai.com/docs/guides/vision

This PR adds the quickstart example. Notably it shows how to use ChatCompletionRequestMessageContentPartTextArgs, ChatCompletionRequestMessageContentPartImageArgs, ImageUrlArgs and ImageUrlDetail.

I followed the logic from the standard chat example. Please let me know if I can improve the PR and thank you very much for creating this crate.

64bit commented 5 months ago

Also closes https://github.com/64bit/async-openai/issues/134