|
@@ -103,6 +103,10 @@ type ChatRequest struct {
|
|
// Tools is an optional list of tools the model has access to.
|
|
// Tools is an optional list of tools the model has access to.
|
|
Tools `json:"tools,omitempty"`
|
|
Tools `json:"tools,omitempty"`
|
|
|
|
|
|
|
|
+ // DryRun when true will prepare and validate the request but stop before sending it to the model.
|
|
|
|
+ // This allows inspecting how the prompt would be constructed and what parameters would be used.
|
|
|
|
+ DryRun bool `json:"dry_run,omitempty"`
|
|
|
|
+
|
|
// Options lists model-specific options.
|
|
// Options lists model-specific options.
|
|
Options map[string]interface{} `json:"options"`
|
|
Options map[string]interface{} `json:"options"`
|
|
}
|
|
}
|
|
@@ -185,10 +189,11 @@ func (t *ToolFunction) String() string {
|
|
// ChatResponse is the response returned by [Client.Chat]. Its fields are
|
|
// ChatResponse is the response returned by [Client.Chat]. Its fields are
|
|
// similar to [GenerateResponse].
|
|
// similar to [GenerateResponse].
|
|
type ChatResponse struct {
|
|
type ChatResponse struct {
|
|
- Model string `json:"model"`
|
|
|
|
- CreatedAt time.Time `json:"created_at"`
|
|
|
|
- Message Message `json:"message"`
|
|
|
|
- DoneReason string `json:"done_reason,omitempty"`
|
|
|
|
|
|
+ Model string `json:"model"`
|
|
|
|
+ CreatedAt time.Time `json:"created_at"`
|
|
|
|
+ Message Message `json:"message"`
|
|
|
|
+ DoneReason string `json:"done_reason,omitempty"`
|
|
|
|
+ DryRunOutput string `json:"dry_run_output,omitempty"`
|
|
|
|
|
|
Done bool `json:"done"`
|
|
Done bool `json:"done"`
|
|
|
|
|