Skip to content

Commit

Permalink
Use Enum for ResponseFormatType
Browse files Browse the repository at this point in the history
  • Loading branch information
nikochiko committed Sep 13, 2024
1 parent 83cacc6 commit bee12c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion daras_ai_v2/language_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,9 @@ def get_entry_text(entry: ConversationEntry) -> str:
)


ResponseFormatType = typing.Literal["text", "json_object"]
class ResponseFormatType(str, GooeyEnum):
text = "text"
json_object = "json_object"


def run_language_model(
Expand Down

0 comments on commit bee12c4

Please sign in to comment.