Skip to content
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

for ChatVectorDBChain, add top_k_docs_for_context to allow control how many chunks of context will be retrieved #1155

Merged
merged 5 commits into from
Feb 20, 2023

Commits on Feb 9, 2023

  1. add optional youtube meta infor (title, description and more)

    have done similar project (youtube summarization and question answeirng).
    
    I find that youtube video meta infor, especially video title and descriptions are quite helpful for LLM to better understand the context.
    
    and similarly, thumbnail image url can be useful when build web app with this.
    
    a sample output would be
    {'source': 'I845O57ZSy4',
     'title': 'John Carmack: Doom, Quake, VR, AGI, Programming, Video Games, and Rockets | Lex Fridman Podcast langchain-ai#309',
     'description': 'John Carmack is a legendary programmer, co-founder of id Software, and lead programmer of many revol...',
     'view_count': 1229347,
     'thumbnail_url': 'https://i.ytimg.com/vi/I845O57ZSy4/sddefault.jpg',
     'publish_date': datetime.datetime(2022, 8, 4, 0, 0),
     'length': 18890,
     'author': 'Lex Fridman',
    }
    
    Love the work you guys have done on LangChain, hope i can also contribute a tiny bit!
    AlexZhangji committed Feb 9, 2023
    Configuration menu
    Copy the full SHA
    47952d3 View commit details
    Browse the repository at this point in the history

Commits on Feb 19, 2023

  1. Configuration menu
    Copy the full SHA
    fce280f View commit details
    Browse the repository at this point in the history
  2. add top_k_docs_for_context to allow user control how many chunk of co…

    …ntext will be retrieved
    
    given that we allow user define chunk size, think it would be useful for user to define how many chunks of context will be retrieved. or the default 4 chunk can break some code.
    AlexZhangji committed Feb 19, 2023
    Configuration menu
    Copy the full SHA
    eec9f0a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9ae9ae1 View commit details
    Browse the repository at this point in the history
  4. Update youtube.py

    AlexZhangji committed Feb 19, 2023
    Configuration menu
    Copy the full SHA
    6a3ef8d View commit details
    Browse the repository at this point in the history