Trieve adapter for Fern
The easiest way to use Trieve in combination with Fern.
You need to retrieve your Org ID and a new API Key:
1. Go to the Trieve dashboard.
2. Copy the Org ID, you will need it later.
3. Press on the API Keys tab.
4. Press Create New Key and select OWNER for the permission.
5. Copy the API Key, you will need it later.
You need:
- the path to your , e.g. ./fern/docs.yml.
- (optional): the url to your , e.g. https://api.vapi.ai/api-json.
- (optional): the to your docs, e.g. https://docs.vapi.ai.
- (optional): the , e.g. api-reference.
``bash`
npm install -g trieve-fern-adapter
You need these environment variables set:
``
TRIEVE_API_HOST=https://api.trieve.ai
TRIEVE_API_KEY=
TRIEVE_ORGANIZATION_ID=
TRIEVE_DATASET_TRACKING_ID=
The TRIEVE_DATASET_TRACKING_ID must be an unique identifier for the dataset, e.g. vapi.
`bash`
trieve-fern-adapter --file
Set these repository secrets:
``
TRIEVE_API_HOST=https://api.trieve.ai
TRIEVE_API_KEY=
TRIEVE_ORGANIZATION_ID=
TRIEVE_DATASET_TRACKING_ID=
Add this workflow to .github/workflows.
`yml
name: Update Trieve
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
on:
push:
branches:
- main
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Trieve Fern Adapter
run: npm install -g trieve-fern-adapter
- name: Update Trieve Chunks
env:
TRIEVE_API_HOST: ${{ secrets.TRIEVE_API_HOST }}
TRIEVE_API_KEY: ${{ secrets.TRIEVE_API_KEY }}
TRIEVE_ORGANIZATION_ID: ${{ secrets.TRIEVE_ORGANIZATION_ID }}
TRIEVE_DATASET_TRACKING_ID: ${{ secrets.TRIEVE_DATASET_TRACKING_ID }}
run: trieve-fern-adapter --file
`
Replace , , , and
MIT