mirror of
https://github.com/katanemo/plano.git
synced 2026-05-10 00:02:43 +02:00
Propagate enums from prompt-target to bolt-fc (#56)
This commit is contained in:
parent
63143fbd01
commit
8a265de7c6
3 changed files with 7 additions and 1 deletions
|
|
@ -300,6 +300,7 @@ impl StreamContext {
|
|||
parameter_type: entity.parameter_type.clone(),
|
||||
description: entity.description.clone(),
|
||||
required: entity.required,
|
||||
enum_values: entity.enum_values.clone(),
|
||||
};
|
||||
properties.insert(entity.name.clone(), param);
|
||||
}
|
||||
|
|
@ -326,7 +327,7 @@ impl StreamContext {
|
|||
|
||||
let msg_body = match serde_json::to_string(&chat_completions) {
|
||||
Ok(msg_body) => {
|
||||
debug!("msg_body: {}", msg_body);
|
||||
debug!("bolt-fc request body content: {}", msg_body);
|
||||
msg_body
|
||||
}
|
||||
Err(e) => {
|
||||
|
|
|
|||
|
|
@ -42,6 +42,9 @@ pub struct ToolParameter {
|
|||
pub description: String,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub required: Option<bool>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[serde(rename = "enum")]
|
||||
pub enum_values: Option<Vec<String>>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
|
|
|
|||
|
|
@ -98,6 +98,8 @@ pub struct Parameter {
|
|||
pub parameter_type: Option<String>,
|
||||
pub description: String,
|
||||
pub required: Option<bool>,
|
||||
#[serde(rename = "enum")]
|
||||
pub enum_values: Option<Vec<String>>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue