awesome-llm-apps icon indicating copy to clipboard operation
awesome-llm-apps copied to clipboard

how to change code to use google gemini in chat_github.py

Open younggggger opened this issue 1 year ago • 1 comments

younggggger avatar May 10 '24 02:05 younggggger

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

Shubhamsaboo avatar May 11 '24 03:05 Shubhamsaboo