File size: 503 Bytes
babeaf6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
from realtime_ai_character.llm.base import AsyncCallbackAudioHandler, AsyncCallbackTextHandler, LLM
def get_llm(model='gpt-3.5-turbo-16k') -> LLM:
if model.startswith('gpt'):
from realtime_ai_character.llm.openai_llm import OpenaiLlm
return OpenaiLlm(model=model)
elif model.startswith('claude'):
from realtime_ai_character.llm.anthropic_llm import AnthropicLlm
return AnthropicLlm(model=model)
else:
raise ValueError(f'Invalid llm model: {model}')
|