Chat with GitHub OpenAPI Specification using RAG (Pinecone and OpenAI)

Chat with GitHub OpenAPI Specification using RAG integrates OpenAI and Pinecone to create an interactive chatbot. It efficiently retrieves and processes GitHub API documentation, enabling users to ask questions and receive accurate, relevant responses. This automated workflow enhances user experience by providing instant access to API information, streamlining the development process, and improving productivity.

7/8/2025
17 nodes
Complex
manualcomplexlangchainsticky noteadvancedapiintegration
Categories:
Complex WorkflowManual Triggered
Integrations:
LangChainSticky Note

Target Audience

  • Developers: Those looking to integrate GitHub API functionalities into their applications.
    - Data Scientists: Users needing a structured way to query and analyze API documentation.
    - Technical Writers: Individuals creating documentation or guides based on GitHub API specifications.
    - Product Managers: Professionals wanting to understand API capabilities for product development.
    - Educators: Teachers and trainers aiming to illustrate API usage in programming courses.
  • Problem Solved

    This workflow addresses the challenge of efficiently accessing and querying GitHub API documentation. It enables users to interact with the API specifications through a chatbot interface, making it easier to find information without manually sifting through extensive documentation.

    Workflow Steps

  • Step 1: User triggers the workflow manually by clicking ‘Test workflow’.
    - Step 2: An HTTP Request fetches the GitHub API specifications from a remote JSON file.
    - Step 3: The specifications are processed and indexed into a Pinecone Vector Store for efficient querying.
    - Step 4: When a chat message is received, the AI Agent interprets the query and generates a user query embedding.
    - Step 5: The query embedding is used to search the Pinecone Vector Store for relevant information.
    - Step 6: The retrieved information is then processed by the OpenAI Chat Model to generate a coherent response.
    - Step 7: The response is sent back to the user, providing them with the needed information about the GitHub API.
  • Customization Guide

  • Modify API Endpoint: Users can change the URL in the HTTP Request node to fetch different API specifications.
    - Adjust Pinecone Index: Change the index name in the Pinecone Vector Store node for different data sets or environments.
    - Customize AI Responses: Edit the systemMessage parameter in the AI Agent node to adjust the tone or focus of the responses.
    - Enhance Text Processing: Users can adjust parameters in the Recursive Character Text Splitter to change how the API documentation is chunked and processed.
    - Integrate Additional Tools: Users can add more nodes for different functionalities, such as logging or additional APIs, to expand the workflow's capabilities.
  • Chat with GitHub OpenAPI Specification using RAG (Pinecone and OpenAI) - N8N Workflow Directory