Find answers from the community

Home
Members
swagz0521
s
swagz0521
Offline, last seen 3 months ago
Joined September 25, 2024
Issue with using Gemini as chat_engine

Code:
Plain Text
from llama_index.llms.gemini import Gemini
if "chat_engine" not in st.session_state.keys(): # Initialize the chat engine
    print("Chat Engine Created")
    st.session_state.chat_engine = index.as_chat_engine(chat_mode = "best", llm = Gemini(), verbose=True)

if st.session_state.messages[-1]["role"] != "assistant":
    with st.chat_message("assistant"):
        with st.spinner("Thinking..."):
            response = st.session_state.chat_engine.chat(prompt)
            print(response)
            st.write(response.response)
            message = {"role": "assistant", "content": response.response}
            st.session_state.messages.append(message) # Add response to message history
32 comments
L
s
Question about
Plain Text
index.as_chat_engine(chat_mode="best")

Other than ReAct and OpenAI Chat Engine, is it possible to use Gemini?
30 comments
L
s
Issue with the transition from Service_context to Settings.
18 comments
s
L
Question about loading multiple indices for RAG using load_indices_from_storage(storage_context)
I have used the embedding to create different indexes with each index in a folder with all the json files.

For example, I have one index for Math, and one index for Science. My goal is to keep them separated instead of combining them into one index.

But running into error with
storage_context = StorageContext.from_defaults(persist_dir=PERSIST_DIR)
index = load_indices_from_storage(storage_context)

Is it possible to load multiple indices?
38 comments
s
a
s
swagz0521
·

Memory

https://github.com/run-llama/llama_index/issues/10493

@Logan M Running into the same issue here. Happy to walk you through to re-produce the bug. Any idea when your guys plan to fix this?
5 comments
L
s
Having issue with
Plain Text
ModuleNotFoundError: No module named 'llama_index.core.llms.base'

It was literally working last night and not sure what happened.
97 comments
W
s
E