Find answers from the community

s
F
Y
a
P
Home
Members
derhyperschlaue
d
derhyperschlaue
Offline, last seen last month
Joined September 25, 2024
my bot answers in english sometimes. but i asked in german. can i specify that my bot keeps the same language that was in the prompt?
1 comment
T
Hello guys, i have a pretty basic code but somethin doesn't work.
my goal is to find a person's role. this is in one of 20 documents.
if i build the index only from the single document which contains the information, my question is answered correctly.
as soon as I have 2 or more documents in the index, my response is something like "There's no information about John Doe in the context".

this is my code:

import modules

from llama_index import VectorStoreIndex, SimpleDirectoryReader
import openai
openai.api_key = 'XYZ'

build index

documents = SimpleDirectoryReader('data').load_data()
index = VectorStoreIndex.from_documents(documents)
query_engine = index.as_query_engine()

ask question

question = "Who is John Doe and what's his job at the company?"
gpt_response = query_engine.query(question).response.replace(". ",".\n")
print(gpt_response)
2 comments
d
L
Anybody tried to use Dolly with Google Colab? I always get this error on my own index:
2 comments
d
L