Find answers from the community

Updated 3 months ago

Hey guys,

Hey guys,
So I can't even start llama-index because of this problem.
Has anyone ever seen this error and knows how to solve it?
Attachment
image.png
L
P
12 comments
I have not seen this. Seems like Microsoft C++ build tools is needed for some reason
tbh I don't know what happened. Next day I tried the same thing and it worked xD
Maybe my pc needed a restart
But still I need some help...
Have you seen this one?
Attachment
image.png
I was following a tutorial which for some reason used langchain just like this
(heads up, your key is in that message)
Seems like maybe we need to re-test our langchain stuff, since its not a core dependency, its not garunteed to work πŸ˜… Uninstall langchain, and do this instead

Plain Text
import os
import openai
#from dotenv import load_dotenv

from llama_index import VectorStoreIndex, SimpleDirectoryReader
from llama_index.llms import OpenAI
from llama_index import ServiceContext, StorageContext, load_index_from_storage

import os
os.environ['OPENAI_API_KEY'] = 'sk-...'

service_context = ServiceContext.from_defaults(
  llm=OpenAI(model='gpt-3.5-turbo', temperature=0.2)
)

documents = SimpleDirectoryReader("data").load_data()
index = VectorStoreIndex.from_documents(documents, service_context=service_context, show_progress=True)

query_engine = index.as_query_engine(similarity_top_k=2)

question = "What did the author do growing up?"
response = query_engine.query(question)

print(response.response)
(I deleted your message with your key lol)
I'll give it a chance
I made it work. Thank so much for your help Logan. ❀️
You can now close this chat πŸ™‚
Add a reply
Sign up and join the conversation on Discord