| 2825 | |
| 2826 | |
| 2827 | class ChatCompletionResponseFormatJsonSchema(BaseModel): |
| 2828 | model_config = ConfigDict(extra="ignore", populate_by_name=True) |
| 2829 | |
| 2830 | name: Optional[str] = None |
| 2831 | description: Optional[str] = None |
| 2832 | schema_: Optional[Dict[str, Any]] = Field(default=None, alias="schema") |
| 2833 | strict: Optional[bool] = None |
| 2834 | |
| 2835 | def to_template_json_schema(self) -> ChatTemplateResponseFormatJsonSchema: |
| 2836 | json_schema: ChatTemplateResponseFormatJsonSchema = {} |
| 2837 | if self.name is not None: |
| 2838 | json_schema["name"] = self.name |
| 2839 | if self.description is not None: |
| 2840 | json_schema["description"] = self.description |
| 2841 | if self.schema_ is not None: |
| 2842 | json_schema["schema"] = self.schema_ |
| 2843 | if self.strict is not None: |
| 2844 | json_schema["strict"] = self.strict |
| 2845 | return json_schema |
| 2846 | |
| 2847 | |
| 2848 | class ChatCompletionResponseFormat(BaseModel): |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…