mirror of https://github.com/0xplaygrounds/rig
docs(gemini): add utility config docstring
This commit is contained in:
parent
1a444ad8d1
commit
7ef411279f
|
@ -19,6 +19,7 @@ async fn main() -> Result<(), anyhow::Error> {
|
|||
.agent(gemini::completion::GEMINI_1_5_PRO)
|
||||
.preamble("Be creative and concise. Answer directly and clearly.")
|
||||
.temperature(0.5)
|
||||
// The `GenerationConfig` utility struct helps construct a typesafe `additional_params`
|
||||
.additional_params(serde_json::to_value(GenerationConfig {
|
||||
top_k: Some(1),
|
||||
top_p: Some(0.95),
|
||||
|
|
|
@ -448,7 +448,9 @@ pub mod gemini_api_types {
|
|||
}
|
||||
|
||||
/// Gemini API Configuration options for model generation and outputs. Not all parameters are
|
||||
/// configurable for every model. From [[Gemini API Reference]](https://ai.google.dev/api/generate-content#generationconfig)
|
||||
/// configurable for every model. From [Gemini API Reference](https://ai.google.dev/api/generate-content#generationconfig)
|
||||
/// ### Rig Note:
|
||||
/// Can be used to cosntruct a typesafe `additional_params` in rig::[AgentBuilder](crate::agent::AgentBuilder).
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct GenerationConfig {
|
||||
|
|
Loading…
Reference in New Issue