Replies: 1 comment
-
🤖 Hello, Thank you for reaching out with your question. Currently, LlamaIndex does not have a built-in YAML loader for regular RAG. The supported file types are listed in the However, you can create your own YAML loader by creating a class that inherits from the Here is an example of how you can use it: from llama_hub.wikipedia.base import WikipediaReader
from llama_index.tools.ondemand_loader_tool import OnDemandLoaderTool
# Assuming you have a YAMLReader class that reads your OpenAPI YAML specification file
from your_module import YAMLReader
reader = YAMLReader('path_to_your_yaml_file')
tool = OnDemandLoaderTool.from_defaults(
reader,
name="YAML Tool",
description="A tool for loading data and querying from YAML file"
) In this example, replace Please note that the You can find more information about this in the LlamaHub Tools Guide. I hope this helps! If you have any other questions, feel free to ask. Best, SourcesThis response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Beta Was this translation helpful? Give feedback.
-
Question Validation
Question
I want to chat with an openapi yaml specification file. The idea is that the user will ask questions about the api and the chatbot should answer from the knowledge about the api from the api specification. For eg. 'How do get a list of all accounts'-> A query engine should retrieve this. I am trying to figure our a loader for YAML files, and I found OPENAPITOOL on llama_hub, but it appears to be designed to work with agents and not query engines. I tried searching the document but did not find any YAML loaders for doing normal RAG. Any assistance over this would be appreciated. If there is any existing code examples that achieve this, that would be great to.
Beta Was this translation helpful? Give feedback.
All reactions