Skip to content

Commit

Permalink
use from_string method
Browse files Browse the repository at this point in the history
  • Loading branch information
justinthelaw committed Sep 16, 2024
1 parent 1ef883b commit 41870db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/leapfrogai_sdk/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def create_chat_completion_response(
choices=[choice], usage=usage
)

response.choices[0].finish_reason = str(finish_reason)
response.choices[0].finish_reason = finish_reason.from_string(finish_reason)

return response

Expand All @@ -109,7 +109,7 @@ def create_completion_response(

response: CompletionResponse = CompletionResponse(choices=[choice], usage=usage)

response.choices[0].finish_reason = str(finish_reason)
response.choices[0].finish_reason = finish_reason.from_string(finish_reason)

return response

Expand Down

0 comments on commit 41870db

Please sign in to comment.