Find answers from the community

E
Erik
Offline, last seen 2 months ago
Joined September 25, 2024
E
Erik
·

Typing

After updating llama index I get this error:
TypeError: Plain typing.TypeAlias is not valid as type argument


Any ideas how to fix this? I am using Python 3.10
1 comment
L
Does chunk_size_limit not work on GPTPineconeIndex?

I've created my index like this: index = GPTPineconeIndex(documents, pinecone_index=index, chunk_size_limit=512)

But when I query it, some of the chunks are way larger:
index.query(q, llm_predictor=LLM_PREDICTOR, text_qa_template=QA_PROMPT, similarity_top_k=5, response_mode="compact")
54 comments
j
E
L
b
I am having problems with using GPTPineconeIndex. I have been trying 3 times for it to index all my data but at some point just throws some connections errors. Pretty annoying as it takes like 5 hours to get through all of my index and the longest I have been able to get it to index is like 2 hours.

Code:
pinecone.init(api_key=pinecone_api_key, environment="us-east1-gcp")
pinecone.create_index("wed-match", dimension=1536, metric="euclidean", pod_type="p1")
index = pinecone.Index("wed-match")

documents = SimpleDirectoryReader('api\data').load_data()
INDEX = GPTPineconeIndex(documents, pinecone_index=index, chunk_size_limit=512)

Errors:
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

raise PineconeProtocolError(f'Failed to connect; did you specify the correct index name?') from e
pinecone.core.exceptions.PineconeProtocolError: Failed to connect; did you specify the correct index name?
7 comments
j
E
I am using simple vector index. Is there a way to save index json file to the vector databases directly instead of making a new index again?
21 comments
M
E
d
p
How can I give different instructions on how to answer when there is nothing in my data with high enough float point that I have set with similarity_cutoff?

Right now all I get back is None
1 comment
L
Is there a way to change encoding on SimpleDirectoryReader().load_data()?

I am loading in the articles with some of them having special characters.
6 comments
E
j
How do I use chatgpt model to answer questions from a huge list of articles?

When I use the davinci model it actually answers my questions but when I tried to use chatgpt model it describes me the article where the information is in.

All the articles are saved as separate txt files and loaded with SimpleDirectoryReader if that is important.

index = GPTSimpleVectorIndex.load_from_disk('index.json') llm_predictor = LLMPredictor(llm=OpenAI(temperature=0, model_name="gpt-3.5-turbo")) response = index.query( "How to plan a wedding?", llm_predictor=llm_predictor )

"The article discusses how to plan a wedding using Allseated, an all-in-one digital platform for organizing wedding ideas, including creating floor plans, seating charts, and guest lists."
15 comments
i
E
L
How do I combine two indexes? If I have 2 different indexes from 2 different sources and I want to join them instead of creating new index.

As I understand index1 + index2 does not work. But is there a way to do this?
1 comment
j
What is the best way to go about indexing excel of csv files for question/answering bot?

Currently what I am doing is turning excel files to csv and then load the data with SimpleDirectoryReader and index it with GPTSimpleVectorIndex. But that sometimes gives unreliable answers.
11 comments
y
E
j