Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion backend-agent/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@
'gemini-2.5-flash',
'gemini-2.5-pro',
],
'perplexity-ai':
[
'sonar',
'sonar-pro',
],
Comment thread
marcorosa marked this conversation as resolved.
}


Expand All @@ -91,13 +96,19 @@ def from_model_name(cls, model_name: str) -> 'LLM':
# Foundation-models scenarios in AI Core
if model_name in AICORE_MODELS['azure-openai']:
return AICoreOpenAILLM(model_name)
# IBM models are compatible with OpenAI completion API
if model_name in AICORE_MODELS['aicore-ibm']:
# IBM models are compatible with OpenAI completion API
return AICoreOpenAILLM(model_name)
if model_name in AICORE_MODELS['aicore-opensource']:
return AICoreOpenAILLM(model_name, False)
# Mistral models are compatible with OpenAI completion API
if model_name in AICORE_MODELS['aicore-mistralai']:
return AICoreOpenAILLM(model_name, False)
# Perplexity models are compatible with OpenAI completion API
if model_name in AICORE_MODELS['perplexity-ai']:
return AICoreOpenAILLM(model_name)
Comment thread
marcorosa marked this conversation as resolved.
Comment thread
marcorosa marked this conversation as resolved.

# Non OpenAI-compatible models in AI Core
if model_name in AICORE_MODELS['aws-bedrock']:
if 'titan' in model_name:
# Titan models don't support system prompts
Expand Down