θΏ™ζ˜―indexlocζδΎ›ηš„ζœεŠ‘οΌŒδΈθ¦θΎ“ε…₯任何密码
Skip to content

Conversation

@timothycarambat
Copy link
Member

Pull Request Type

  • ✨ feat
  • πŸ› fix
  • ♻️ refactor
  • πŸ’„ style
  • πŸ”¨ chore
  • πŸ“ docs

Relevant Issues

resolves #766

What is in this change?

Describe the changes in this PR that are impactful to the repo.

Additional Information

improve error messages from YT scraping when transcriptions are disabled
allow all youtube URLS and then parse the given URL and see if we can enforce it then instead of blocking all URLs that dont match the schema on input.

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

parse & enforce URL to allow multiple URL schemas
@timothycarambat timothycarambat merged commit d896105 into master Feb 21, 2024
@review-agent-prime
Copy link

collector/utils/extensions/YoutubeTranscript/index.js

Instead of returning the raw error message to the user, it would be better to log the error and return a generic error message. This will prevent potential information leakage.
Create Issue
See the diff
Checkout the fix

    const { docs, error } = await loader
      .load()
      .then((docs) => {
        return { docs, error: null };
      })
      .catch((e) => {
        console.error(e);
        return {
          docs: [],
          error: "An error occurred while loading the transcript.",
        };
      });
git fetch origin && git checkout -b ReviewBot/Impro-44upe1o origin/ReviewBot/Impro-44upe1o

@timothycarambat timothycarambat deleted the 766-better-yt-error-msg branch February 21, 2024 18:47
cabwds pushed a commit to cabwds/anything-llm that referenced this pull request Jul 3, 2025
parse & enforce URL to allow multiple URL schemas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT]: Youtube collector - return better responses

2 participants