-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(openai): be tolerant to exceptions (#8526)
* feat: be tolerant to exceptions if ever an error is raised by the OpenAI API, don't fail the entire processing * fix: missing import, string separator * Enhance error handling * Use batched from more_itertools for compatibility with older Python versions * Fix batching and add test --------- Co-authored-by: Silvano Cerza <[email protected]>
- Loading branch information
1 parent
f085959
commit c78545d
Showing
3 changed files
with
63 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
enhancements: | ||
- | | ||
Change `OpenAIDocumentEmbedder` to keep running if a batch fails embedding. | ||
Now OpenAI returns an error we log that error and keep processing following batches. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters