feat: add client.list_models() method

This commit is contained in:
Ivan Gabriele
2024-03-03 19:38:34 +01:00
parent 7de2b19b98
commit 814b9918b3
6 changed files with 100 additions and 65 deletions

View File

@@ -44,9 +44,9 @@ pub struct ChatCompletionRequest {
pub stream: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub safe_prompt: Option<bool>,
// TODO Check that prop (seen in official Python client but not in API doc).
// TODO Check this prop (seen in official Python client but not in API doc).
// pub tool_choice: Option<String>,
// TODO Check that prop (seen in official Python client but not in API doc).
// TODO Check this prop (seen in official Python client but not in API doc).
// pub response_format: Option<String>,
}
impl ChatCompletionRequest {
@@ -95,7 +95,7 @@ pub struct ChatCompletionChoice {
pub index: u32,
pub message: ChatCompletionMessage,
pub finish_reason: String,
// TODO Check that prop (seen in API responses but undocumented).
// TODO Check this prop (seen in API responses but undocumented).
// pub logprobs: ???
}