Find answers from the community

Home
Members
kamyarmhd
k
kamyarmhd
Offline, last seen 3 months ago
Joined September 25, 2024
hey guys. i am trying to make a wheel for llama-cpp-python with the following line in Google Colab:
Plain Text
!CMAKE_ARGS="-DLLAMA_CUBLAS=on" FORCE_CMAKE=1 pip install llama-cpp-python

Till last week it worked properly, but now when i try to run that i faced the following error:
Plain Text
  error: subprocess-exited-with-error
  
  × Building wheel for llama-cpp-python (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  Building wheel for llama-cpp-python (pyproject.toml) ... error
  ERROR: Failed building wheel for llama-cpp-python
Failed to build llama-cpp-python
ERROR: Could not build wheels for llama-cpp-python, which is required to install pyproject.toml-based projects

Do you have any idea?
4 comments
L
k
he guys. I am using the following line(PDFReader) in order to load my pdf file as input data:
now my question is that how I can use just first page or a specific page of my file during querying it?
in the following you can see how i make index and other stuff:
Plain Text
PDFReader = download_loader("PDFReader")
`loader = PDFReader()
`documents = loader.load_data(file=Path('/content/4.pdf'))

service_context = ServiceContext.from_defaults(llm=llm, embed_model=embed_model, chunk_size=256, chunk_overlap=50)
index = VectorStoreIndex.from_documents(documents, service_context=service_context)
query_engine = index.as_query_engine(llm=llm)
Plain Text
invoice_type = query_engine.query("""
What is the month and year of the period of consumption of this invoice?
I want just dates as your response without words
                              """)

I mean how I can use just data presented in first page of pdf, because in some cases there are some similar text in differen page that make the llm confuse but I now in advance the related data is in which page
3 comments
L
k
Hi guys. I have a question:
I am using RetrieverQueryEngine but with different llm model than OpenAI, I am using Llama2. when I want to run the following snippet:

Plain Text
 
from llama_index.core.retrievers import VectorIndexRetriever
from llama_index.core.query_engine import RetrieverQueryEngine

retriever = VectorIndexRetriever( 
    index = index,
    similarity_top_k = 4)
query_engine = RetrieverQueryEngine(retriever=retriever) 


I get the following error:

ValueError:
**
Could not load OpenAI model. If you intended to use OpenAI, please check your OPENAI_API_KEY.
Original error:
No API key found for OpenAI.
Please set either the OPENAI_API_KEY environment variable or openai.api_key prior to initialization.
API keys can be found or created at https://platform.openai.com/account/api-keys

To disable the LLM entirely, set llm=None.
**

how I can solve it?
1 comment
W