Skip to content

Commit 7153450

Browse files
authored
Mark members of AssistantFunction & AssistantTool as pub (#274)
It was priorly impossible to construct these structs due to the private members. I don't see any reason they should have been private in the first place. FYI @kennetheversole (bugged you internally about this)
1 parent d8d1f57 commit 7153450

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

cloudflare/src/endpoints/ai/execute_model.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -335,28 +335,28 @@ impl ToString for MessageRole {
335335
pub struct AssistantFunction {
336336
/// The function code.
337337
#[serde(skip_serializing_if = "Option::is_none")]
338-
code: Option<String>,
338+
pub code: Option<String>,
339339

340340
/// The function name.
341-
name: String,
341+
pub name: String,
342342

343343
/// The function parameters (if applicable).
344344
#[serde(skip_serializing_if = "Option::is_none")]
345-
parameters: Option<String>,
345+
pub parameters: Option<String>,
346346
}
347347

348348
/// Represents a tool with additional details.
349349
#[derive(Clone, Debug, Serialize, Deserialize)]
350350
pub struct AssistantTool {
351351
/// A description of the tool.
352-
description: String,
352+
pub description: String,
353353

354354
/// The name of the tool.
355-
name: String,
355+
pub name: String,
356356

357357
/// The parameters associated with the tool.
358358
#[serde(skip_serializing_if = "Option::is_none")]
359-
parameters: Option<String>,
359+
pub parameters: Option<String>,
360360
}
361361

362362
/// Parameters for the `Translation` task.

0 commit comments

Comments
 (0)