awesome-llm-apps
awesome-llm-apps copied to clipboard
how to change code to use google gemini in chat_github.py
You can explicitly define the app config in a function and there you can change the model. Something like this:
# Define the embedchain_bot function
def embedchain_bot(db_path, api_key):
return App.from_config(
config={
"llm": {"provider": "openai", "config": {"model": "gpt-4-turbo", "temperature": 0.5, "api_key": api_key}},
"vectordb": {"provider": "chroma", "config": {"dir": db_path}},
"embedder": {"provider": "openai", "config": {"api_key": api_key}},
}
)
Check out this example for inspiration: https://github.com/Shubhamsaboo/awesome-llm-apps/tree/main/chat_with_substack