uezo / aiavatarkit

🥰 Building AI-based conversational avatars lightning fast ⚡️💬
Apache License 2.0
257 stars 21 forks source link

Add support Claude and Gemini #42

Closed uezo closed 6 months ago

uezo commented 6 months ago

We support Claude and Gemini as the Generative AI to process chat.

Claude

Create instance of ClaudeProcessor with custom parameters and set it to AIAvatar. The default model is claude-3-sonnet-20240229.

from aiavatar.processors.claude import ClaudeProcessor

claude_processor = ClaudeProcessor(
    api_key="ANTHROPIC_API_KEY"
)

app = AIAvatar(
    google_api_key=GOOGLE_API_KEY,
    chat_processor=claude_processor
)

NOTE: We support Claude 3 on Anthropic API, not Amazon Bedrock for now.

Gemini

Create instance of GeminiProcessor with custom parameters and set it to AIAvatar. The default model is gemini-pro.

from aiavatar.processors.gemini import GeminiProcessor

gemini_processor = GeminiProcessor(
    api_key="YOUR_GOOGLE_API_KEY"
)

app = AIAvatar(
    google_api_key=GOOGLE_API_KEY,
    chat_processor=gemini_processor
)

NOTE: We support Gemini on Google AI Studio, not Vertex AI for now.