Skip to content

Commit

Permalink
add together_ai to utils
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 672571535
Change-Id: I34d91a7446b6eb84a3b5d62f17213ef998337068
  • Loading branch information
vezhnick authored and copybara-github committed Sep 9, 2024
1 parent a8fbfcc commit 1c717c2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion concordia/language_model/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from concordia.language_model import no_language_model
from concordia.language_model import ollama_model
from concordia.language_model import pytorch_gemma_model
from concordia.language_model import together_ai


def language_model_setup(
Expand Down Expand Up @@ -57,7 +58,8 @@ def language_model_setup(
return amazon_bedrock_model.AmazonBedrockLanguageModel(model_name)
elif api_type == 'google_aistudio_model':
return google_aistudio_model.GoogleAIStudioLanguageModel(
model_name=model_name, api_key=api_key)
model_name=model_name, api_key=api_key
)
elif api_type == 'langchain_ollama':
return langchain_ollama_model.LangchainOllamaLanguageModel(model_name)
elif api_type == 'mistral':
Expand All @@ -68,5 +70,7 @@ def language_model_setup(
return gpt_model.GptLanguageModel(model_name, api_key=api_key)
elif api_type == 'pytorch_gemma':
return pytorch_gemma_model.PyTorchGemmaLanguageModel(model_name)
elif api_type == 'together_ai':
return together_ai.Gemma2(model_name, api_key=api_key)
else:
raise ValueError(f'Unrecognized api type: {api_type}')

0 comments on commit 1c717c2

Please sign in to comment.