Skip to content

Commit 920f062

Browse files
committed
Support IBM models
1 parent ec32891 commit 920f062

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

backend-agent/llm.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
'gpt-35-turbo-0125',
3131
'gpt-35-turbo-16k',
3232
'gpt-4-32k',
33-
'gpt-4o-mini'
33+
'gpt-4o-mini',
3434
],
3535
'opensource':
3636
[
@@ -45,6 +45,10 @@
4545
'gemini-1.0-pro',
4646
'gemini-1.5-pro',
4747
'gemini-1.5-flash'
48+
],
49+
'ibm':
50+
[
51+
'ibm--granite-13b-chat'
4852
]
4953
}
5054

@@ -70,6 +74,9 @@ def from_model_name(cls, model_name: str) -> 'LLM':
7074
return AICoreOpenAILLM(model_name)
7175
if model_name in AICORE_MODELS['opensource']:
7276
return AICoreOpenAILLM(model_name, False)
77+
if model_name in AICORE_MODELS['ibm']:
78+
# IBM models are compatible with OpenAI completion API
79+
return AICoreOpenAILLM(model_name)
7380
if model_name in AICORE_MODELS['vertexai']:
7481
return AICoreGoogleVertexLLM(model_name)
7582
if model_name == 'mistral':

0 commit comments

Comments
 (0)