Skip to content

Commit

Permalink
fix model property key
Browse files Browse the repository at this point in the history
  • Loading branch information
guchenhe committed Jan 2, 2024
1 parent 7777c34 commit 9344091
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ def get_customizable_model_schema(self, model: str, credentials: dict) -> AIMode

if model_type == ModelType.LLM:
if credentials['mode'] == 'chat':
entity.model_properties['mode'] = LLMMode.CHAT
entity.model_properties[ModelPropertyKey.MODE] = LLMMode.CHAT
elif credentials['mode'] == 'completion':
entity.model_properties['mode'] = LLMMode.COMPLETION
entity.model_properties[ModelPropertyKey.MODE] = LLMMode.COMPLETION
else:
raise ValueError(f"Unknown completion type {credentials['completion_type']}")

Expand Down

0 comments on commit 9344091

Please sign in to comment.