You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`
from llama_index import GPTSimpleVectorIndex, SimpleDirectoryReader
import openai
import os
os.environ['OPENAI_API_KEY'] = 'sk-xxxxx' # my api key
documents=SimpleDirectoryReader('data').load_data()
index=GPTSimpleVectorIndex.from_documents(documents)
response=index.query('what is a cat?')
print(response)
`
This is the basic code to get an answer, and should work, but in the response i only get some runtime messages and not the answer:
INFO:llama_index.token_counter.token_counter:> [query] Total LLM token usage: 0 tokens
INFO:llama_index.token_counter.token_counter:> [query] Total embedding token usage: 5 tokens
and the value of the variable response is None
why? thank you
The text was updated successfully, but these errors were encountered:
`
from llama_index import GPTSimpleVectorIndex, SimpleDirectoryReader
import openai
import os
os.environ['OPENAI_API_KEY'] = 'sk-xxxxx' # my api key
documents=SimpleDirectoryReader('data').load_data()
index=GPTSimpleVectorIndex.from_documents(documents)
response=index.query('what is a cat?')
print(response)
`
This is the basic code to get an answer, and should work, but in the response i only get some runtime messages and not the answer:
INFO:llama_index.token_counter.token_counter:> [query] Total LLM token usage: 0 tokens
INFO:llama_index.token_counter.token_counter:> [query] Total embedding token usage: 5 tokens
and the value of the variable response is None
why? thank you
The text was updated successfully, but these errors were encountered: