Skip to content

Commit 990b6ad

Browse files
authored
fix mypy error
1 parent 563f456 commit 990b6ad

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/together/types/chat_completions.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,17 @@ class ChatCompletionMessage(BaseModel):
7070

7171

7272
class ResponseFormat(BaseModel):
73-
type: ResponseFormatType
74-
schema_: Dict[str, Any] | None = None
75-
pattern: str | None = None
76-
77-
def to_dict(self) -> Dict[str, Any]:
78-
result = {"type": self.type}
79-
if self.schema_ is not None:
80-
result["schema"] = self.schema_
81-
if self.pattern is not None:
82-
result["pattern"] = self.pattern
83-
return result
73+
type: ResponseFormatType
74+
schema_: Dict[str, Any] | None = None
75+
pattern: str | None = None
76+
77+
def to_dict(self) -> Dict[str, Any]:
78+
result: Dict[str, Any] = {"type": self.type.value}
79+
if self.schema_ is not None:
80+
result["schema"] = self.schema_
81+
if self.pattern is not None:
82+
result["pattern"] = self.pattern
83+
return result
8484

8585

8686
class FunctionTool(BaseModel):

0 commit comments

Comments
 (0)