feat: Add DataSchema tool for retrieving schema information from CSV and Excel files
This commit is contained in:
@@ -202,6 +202,13 @@ func (c *RemoteAPIChat) buildChatCompletionRequest(messages []Message,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(opts.Format) > 0 {
|
||||
req.ResponseFormat = &openai.ChatCompletionResponseFormat{
|
||||
Type: openai.ChatCompletionResponseFormatTypeJSONObject,
|
||||
}
|
||||
req.Messages[len(req.Messages)-1].Content += fmt.Sprintf("\nUse this JSON schema: %s", opts.Format)
|
||||
}
|
||||
}
|
||||
|
||||
// ChatTemplateKwargs is only supported by custom backends like vLLM.
|
||||
|
||||
Reference in New Issue
Block a user