Closed bojake closed 4 months ago
AssistantToolsCode
is one of the three possible schemas that can be included in the tools
array property that is present in multiple schemas like: AssistantObject
, CreateAssistantRequest
, ModifyAssistantRequest
, RunObject
and many others. The other two possible values are: AssistantToolsFileSearch
and AssistantToolsFunction
.
understood, the code generator from microsoft visual studio seems to be confused by your yaml and the "Tools" enum for the assistant only has "CodeInterpreter" as a member because it binds the AssistantToolsCode type to that field.
The result from VS today:
[Newtonsoft.Json.JsonProperty("tools", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.MaxLength(128)]
public System.Collections.Generic.ICollection<**AssistantToolsCode**> Tools { get; set; } = new System.Collections.ObjectModel.Collection<AssistantToolsCode>();
This is the "Tools" created for the "AssistantObject"
I myself use a Swift code generator and I see a lot of weirdness when it comes to these enums that have only one case such as AssistantToolsCode
. This API has its own ways of modeling data and there are lots of details and inconsistencies that I still can't figure out.
The AssistantToolsCode enum (line 10233 in the yaml) is missing "file_search" and "function".