Find answers from the community

B
BC
Offline, last seen 3 months ago
Joined September 25, 2024
how do I call all points in a qdrant vector_store
11 comments
k
B
getting this error when running LLMQuestionGenerator:
Plain Text
  SubQuestion expected dict not str (type=type_error)


from this code:
Plain Text
query= input("Query: ")

question_gen = LLMQuestionGenerator.from_defaults(llm=Settings.llm)

tool_choices = [
    ToolMetadata(
        name="vyos",
        description="Provides information about VyOS and its contents",
    ),
    ToolMetadata(
        name="ubuntu",
        description="Provides information about Ubuntu and its contents",
    ),
]

# Generate sub-questions
query_bundle = QueryBundle(query_str=query)
choices = question_gen.generate(tool_choices, query_bundle)
for choice in choices:
    print(choice)
4 comments
L
B
I'm trying to use filtering_list = MetadataFilters(filters=[
MetadataFilter(key='file_name', operator=FilterOperator.EQ, value=metadata),
MetadataFilter(key='file_name', operator=FilterOperator.EQ, value=metadata),
condition="or")

the "value = metadata" is just the name of the metadata I gave a group of documents in the database to be called to later from the filter. The issue is when my filter faces two different topics and tries to retrieve information it stops working and outputs the wrong response. Is there a way to refine the filter in a way to guarantee it pulls the two different metadatas?
2 comments
B
L
in the SimpleDirectoryReader() llama-index-readers-file isn't recognizing PandasExcelReader even though the documentation says it was added:
from llama_index.readers.file import (
DocxReader,
EpubReader,
HWPReader,
ImageReader,
IPYNBReader,
MarkdownReader,
MboxReader,
PandasCSVReader,
PandasExcelReader,
PDFReader,
PptxReader,
VideoAudioReader,
) # pants: no-infer-dep
3 comments
B
L
For SimpleComposableMemory: I'm trying to use the clear method on VectorMemory with different vector stores but it is not a function for any external vector stores and it is not a function for any of the internal vector stores provided by llama-index. This is the function causing issues in the script:

def reset(self) -> None:
"""Reset chat history."""
self.vector_index.vector_store.clear()

Has anyone gotten SimpleComposableMemory to work with a vector store of any kind. Currently working with ChromaDB
40 comments
B
L
I'm having issues when adding documents to an already built vectorstore so when the documents are added it looks like this:
{'page_label': '2213', 'file_name': 'pfsense'}
{'page_label': '2214', 'file_name': 'pfsense'}
{'page_label': '2215', 'file_name': 'pfsense'}
{'page_label': '2216', 'file_name': 'pfsense'}
{'page_label': '2217', 'file_name': 'pfsense'}
{'page_label': '2218', 'file_name': 'pfsense'}
{'page_label': '2219', 'file_name': 'pfsense'}
{'page_label': '2220', 'file_name': 'pfsense'}
{'page_label': '2221', 'file_name': 'pfsense'}
{'page_label': '2222', 'file_name': 'pfsense'}
{'page_label': '2223', 'file_name': 'pfsense'}
I want to get rid of the page_label because what its supposed to look like is this:
{'file_name': 'pfsense'}

this is the code:
12 comments
B
L
@Logan M I'm having issues with the response from my agent where function calls are being outputted with the response and getting weird responses asking for my turn to answer. How do I refine the response so it doesn't include this mess?

using CoAAgentWorker() class and getting an odd output as the response from the agent:
Plain Text
Here's my rewritten answer:

Available functions: [FUNC ?(input: string) = y1]

Question: how to find an ip address in vyos?

Abstract plan of reasoning: To find an IP address in VyOS, first access the Vyos terminal by executing Rewrite The client MAY choose to explicitly provide the identifier through the ‘client identifier’ option. If the client supplies a ‘client identifier’, the client MUST use the same ‘client identifier’ in all subsequent messages, and the server MUST use that identifier to identify the client.

Example: set interfaces bonding bond0 vif 10 dhcp-options client-id 'foo-bar' set interfaces bonding <interface> vif <vlan-id> dhcp-options host-name <hostname>

Instead of sending the real system hostname to the DHCP server, overwrite the host-name with this given-value.]. Then, run the command [FUNC "show interfaces eth1" = y3] to display information about eth1. The output will include the IP address associated with eth1.

Your Turn:
Please execute the function calls and fill in the placeholders (y1, "Rewrite The client MAY choose to explicitly provide the identifier through the ‘client identifier’ option. If the client supplies a ‘client identifier’, the client MUST use the same ‘client identifier’ in all subsequent messages, and the server MUST use that identifier to identify the client.

Example: set interfaces bonding bond0 vif 10 dhcp-options client-id 'foo-bar' set interfaces bonding <interface> vif <vlan-id> dhcp-options host-name <hostname>

Instead of sending the real system hostname to the DHCP server, overwrite the host-name with this given-value." and y3) to get the final response.

2 comments
L
@Logan M is it possible to change the functioncalling agent's api so it doesn't require openai I want to use ollama but im only familiar with implementing its base url call to "localhost:XXXX" amd having it connect. Is there a way to implement that in this scenario?
4 comments
L
B
@kapa.ai how do I approach querying multiple vectors?
74 comments
k
B
does anyone know if theres a way to use lm studio without using os.environ?
1 comment
L
I don't want to use an openai key but it seems it's forcing me because it asks for an openai api key. Is anyone using LM studio or another local llm
33 comments
B
L