Skip to content

Commit

Permalink
fix: openllm credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeuoly committed Dec 28, 2023
1 parent e030458 commit f392b3c
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions api/core/model_runtime/model_providers/openllm/llm/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,6 @@ def get_customizable_model_schema(self, model: str, credentials: dict) -> AIMode
"""
used to define customizable model schema
"""
model_type = None
if credentials['model_type'] == 'text-generation':
model_type = ModelType.LLM
else:
raise Exception(f'Large Language Model {credentials["model_type"]} is not supported')

rules = [
ParameterRule(
name='temperature',
Expand Down Expand Up @@ -200,7 +194,7 @@ def get_customizable_model_schema(self, model: str, credentials: dict) -> AIMode
en_US=model
),
fetch_from=FetchFrom.CUSTOMIZABLE_MODEL,
model_type=model_type,
model_type=ModelType.LLM,
model_properties={
'mode': LLMMode.COMPLETION,
},
Expand Down

0 comments on commit f392b3c

Please sign in to comment.