Find answers from the community

Home
Members
andrewv
a
andrewv
Offline, last seen 4 months ago
Joined September 25, 2024
a
andrewv
·

Querying

Hey all, I think I have a conceptual blocker. So what I want to do is not use open ai as my llm but instead use a model hosted on my own cloud that is pretty decent. So when I use a local index i think everything is hunky dory.

What I am trying to do: I have a pinecone db with all my embeddings, my expectation is to use OpenAI embeddings, but switch out the model for my custom llm with a custom llm class, and be able to query them in a similar way that I have been when OpenAI was my llm predictor.

What happens: When I try to now query with GPTPineconeIndex it only sifts through one embedding with minimal data. Is that normal?

My understanding: Llama index retrieves my embeddings, it finds the embedding match closest to the query, the query question and the embedding context is then sent to the LLM, and then the LLM creates an answer and sends it back.

Please let me know where I am off base
5 comments
a
L
Hey for Service context are all these attributes required? 'prompt_helper', 'embed_model', 'node_parser', and 'llama_logger'. I get an error that they are
9 comments
a
L
Hey all I am trying to use a non default embedding(trying to use hugging face) with a pinecone index but I keep on getting an error that it does not access an embed param? Here is my code for reference:

gpt_index = pinecone.Index("testing")
embed_model = LangchainEmbedding(HuggingFaceEmbeddings())
index = GPTPineconeIndex(pinecone_index=gpt_index, embedding_model=embed_model)

I am also on llama-index 0.5.8

Would appreciate any help!
27 comments
L
a
Hey is anybody familiar with the GithubReader? I keep on getting an error : KeyError: 'commit'
4 comments
a
M
a
andrewv
·

Index error

Hey all, I would love some help(also thanks to the folks helping me so far). So I switched to chroma on aws, and I created a script that loads markdown contents from github to chroma but i am wondering if I am doing it right because when I try to query it I get IndexError: list index out of range:

My code to query it is:

chroma_client = chromadb.Client(Settings(chroma_api_impl="rest",
chroma_server_host="some ip address",
chroma_server_http_port=8000))

print(chroma_client)
collection = chroma_client.get_collection(name="some collection")
print(collection)
index = GPTChromaIndex.from_documents([], chroma_collection=collection)
response = index.query("What is python?")
print(response)

And my script to load the content from github is something like this:

for item in folder:
# If item is a file, and its type is markdown, get its contents
if item.type == "file" and item.name.endswith(".md"):
markdown_content = item.decoded_content.decode('utf-8')

# Add the file's content to the list
new_document = Document(text=markdown_content, doc_id=item.name)
markdown_files.append(new_document)

then I load as an index here

index = GPTChromaIndex.from_documents(markdown_files, chroma_collection=chroma_collection)

Anybody know what I am doing wrong? My backup plan is to sync stuff to s3 but that seems sort of weird.
52 comments
a
L
F