-
Notifications
You must be signed in to change notification settings - Fork 0
Adding integrations
Noel Fran Thomas edited this page Jul 19, 2024
·
3 revisions
updated July 19, 2024
The code changes for each can be found around July 16, 2024.
A data integration imports data from one source and stores it in Bridge. Bridge decides how and where to load the data, and will also decide what information to return during a query. For this, we are using Nango as a proxy API.
- Non-syncing (for now)
- Bridge decides how to search
- Add integration to Nango
- Add connection to Nango
- Add to the type-selector, by updating labels in @/lib/data/data.tsx
- Add code to build a file that can be sent to Bridge. For example, in the Linear connection, we build a json file that holds all issues. On submit, this is sent to Bridge. Name this code @/components/add-data-.tsx. Make sure to send the file type as the c_type argument if it has a specific structure (PDFs, and .docx can be inferred, but Linear json can’t be).
- Add code to Bridge to check for the new file type (if there is one)
- Add code to Bridge to handle that file in the load function under storage.py
A search integration does not import any data. Instead, these integrations are called at query time. Sorting, ranking and so forth are the responsibility of the integration.
- Syncing
- Search results are decided by the search integration
- Create a results type. What do you expect to receive when the search API is called?
- Create a tool that can be registered, and makes an API call. Call this @/lib/agents/tools/-search.tsx
- Register the tool to @/lib/agents/tools/index.tsx
- Update the prompt in @/lib/agents/researcher.tsx to help the called LLM understand the new tool.
- Add code to @/components/ to create a search results section. This will handle how your results are displayed. Call this @/components/search-results-.tsx.
- Update @/components/search-section.tsx to receive the new search results