pycui's picture
Add RealChar deployment for HuggingFace (V0)
babeaf6
raw
history blame contribute delete
503 Bytes
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}')