valentinegb / openai

An unofficial Rust library for the OpenAI API.
https://crates.io/crates/openai/
MIT License
61 stars 18 forks source link

`CreateCompletionRequestBody.temperature/top_p` should be floating point number #15

Closed valentinegb closed 1 year ago

valentinegb commented 1 year ago

Bug Description

CreateCompletionRequestBody’s temperature and top_p properties have type u8, however the API expects a value between 0.0 and 1.0.

Expected Behavior

The properties should be a type that can accept floating point numbers.

Library Version

1.0.0-alpha.2

rustc Version

1.66.0 (69f9c33d7 2022-12-12)

cargo Version

1.66.0 (d65d197ad 2022-11-15)

Platform

macOS