-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(community): Add AirtableLoader to load documents from Airtable with retry and pagination handling #7106
feat(community): Add AirtableLoader to load documents from Airtable with retry and pagination handling #7106
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
const maxRetries = AirtableLoader.MAX_RETRIES; | ||
const retryDelayMs = AirtableLoader.DEFAULT_RETRY_DELAY_MS; | ||
|
||
if (attempt <= maxRetries) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally prefer the builtin AsyncCaller
for consistency:
https://github.com/langchain-ai/langchainjs/blob/main/langchain-core/src/utils/async_caller.ts
How to use (it's a built-in field on the base Embeddings
class): https://github.com/langchain-ai/langchainjs/blob/main/libs/langchain-openai/src/chat_models.ts#L1821
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import example
import { AsyncCaller } from "@langchain/core/utils/async_caller"; |
Thanks! See small comment |
…hainjs into document_loaders/airtable
@jacoblee93, updated loader to us AsyncCaller. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
); | ||
} | ||
|
||
this.asyncCaller = new AsyncCaller({ maxRetries: 3, maxConcurrency: 5 }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be nice to make this configurable in the future but fine for now
As per discussion #7064
Summary:
This PR introduces the AirtableLoader class, a document loader for fetching records from Airtable using the LangChain framework. The loader supports features such as pagination, retry logic, and environment-based API token validation to facilitate reliable document loading from Airtable tables.
Changes:
Introduced AirtableLoader class that supports synchronous and asynchronous generator-based document loading.
Testing: