Closed trrwilson closed 4 days ago
One item for additional context.
RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject
so its not just a .NET issue.Another option we can consider here is if tsp has something like Foo.bar.baz._model
where we could directly target the anonymous object. This would be better for 2 reasons.
Foo.bar.baz.x
.::type
can be used to reference the anonymous types and its properties. Here using @doc as example
model Foo {
bar: {
baz: {
x: int32;
};
};
}
@@doc(Foo.bar, "MyBarName");
@@doc(Foo.bar::type.baz::type.x, "MyBazName");
Clear and concise description of the problem
OpenAI's API specification has a plethora of anonymous models -- in-line objects and other constructs defined within the structure of top-level named type.
Concrete example: the 'code_interpreter' property, as anonymously defined within a 'tool_resources' property that in turn is part of the 'CreateAssistantRequest' component schema.
Many of these end up with... "human-unfriendly" emitter-generated names (speaking to .NET here), owing to being nested many layers deep -- exhibit A,
RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject
(a real emitted name, further concatenated for things like UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.cs.Problems include:
RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject
toRunStepCodeInterpreterOutput
.Enter the request: It would be nice to be able to rename these directly in .tsp with something like the following.
Using this as the tsp
We could name both the bar and baz model like this
The clientName decorator would take a new parameter to indicate if it is targeting the anonymous model resulting from the property that is passed in or false (the default) if it is targeting the property itself just like before.
Checklist