Find answers from the community

Home
Members
fullstack
f
fullstack
Offline, last seen 3 months ago
Joined September 25, 2024
f
fullstack
·

Lock

Plain Text
        vector_store = WeaviateVectorStore(weaviate_client=client)
        # print(dir(vector_store))
        storage_context = StorageContext.from_defaults(
            vector_store=vector_store)
        index = VectorStoreIndex.from_documents(
            documents,
            storage_context=storage_context
        )

        retriever = index.as_retriever(retriever_mode='embedding')
        query_engine = RetrieverQueryEngine.from_args(
            retriever, response_mode='no_text')

When I am indexing using weaviate, other users are unable to query other indexes. Its like it locks up weaviate from responding? Is this a weaviate issue or because I am using LlamaIndex?
1 comment
W
Is it possible to use llama index to split a large document into just an array of text, but based on 1000, 2000, 4000, and 8000 tokens?
2 comments
f
L
is it possible to use llama index as a utility tool kit, meaning, instead of calling chains... LLMChain and PromptTemplate, call OpenAI openai.ChatCompletion.create directly? And manually create my context, memory, etc?
5 comments
L
f
Help. When I call response.get_formatted_sources() I get blank on index.as_chat_engine() ... but index.as_query_engine() returns formatted sources.
Plain Text
chat_engine = index.as_chat_engine()
response = chat_engine.query("What did the author do growing up?")
print("get_formatted_sources():", response.get_formatted_sources()) # <-- BLANK
# get_formatted_sources(): < -- BLANK HERE
print("metadata:", response.metadata)
# metadata: None
print("response:", response.response)
# response: Growing up, the author wrote short stories, programmed on an IBM 1401, and eventually convinced his father to buy him a TRS-80 microcomputer. He wrote simple games, a program to predict how high his model rockets would fly, and a word processor. He studied philosophy in college, but eventually switched to AI. He wrote essays and published them online, and worked on spam filters and painting. He also hosted dinners for a group of friends every Thursday night and bought a building in Cambridge.
print("source_nodes:", response.source_nodes)
# source_nodes: []
7 comments
L
f