openai_orch/chat/
mod.rs

1//! Requests and responses using Chat models.
2
3pub mod siso;
4
5/// Parameters common to all OpenAI Chat models.
6///
7/// Refer to `async-openai`'s `CreateChatCompletionRequest` for exact details.
8#[derive(Clone)]
9pub struct ChatModelParams {
10  pub model:             String,
11  pub temperature:       f32,
12  pub top_p:             f32,
13  pub stop:              Vec<String>,
14  pub max_tokens:        u64,
15  pub frequency_penalty: f32,
16  pub presence_penalty:  f32,
17}
18
19impl Default for ChatModelParams {
20  fn default() -> Self {
21    Self {
22      model:             String::from("gpt-3.5-turbo"),
23      temperature:       0.0,
24      top_p:             1.0,
25      stop:              vec![],
26      max_tokens:        256,
27      frequency_penalty: 0.0,
28      presence_penalty:  0.0,
29    }
30  }
31}