Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: langchain-ai/langchain
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.0.337
Choose a base ref
...
head repository: langchain-ai/langchain
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.0.338
Choose a head ref
  • 12 commits
  • 27 files changed
  • 10 contributors

Commits on Nov 17, 2023

  1. Override Keys Option (#13537)

    Should be able to override the global key if you want to evaluate
    different outputs in a single run
    hinthornw authored Nov 17, 2023
    Configuration menu
    Copy the full SHA
    5a28dc3 View commit details
    Browse the repository at this point in the history
  2. IMPROVEMENT Neptune graph updates (#13491)

    ## Description
    This PR adds an option to allow unsigned requests to the Neptune
    database when using the `NeptuneGraph` class.
    
    ```python
    graph = NeptuneGraph(
        host='<my-cluster>',
        port=8182,
        sign=False
    )
    ```
    
    Also, added is an option in the `NeptuneOpenCypherQAChain` to provide
    additional domain instructions to the graph query generation prompt.
    This will be injected in the prompt as-is, so you should include any
    provider specific tags, for example `<instructions>` or `<INSTR>`.
    
    ```python
    chain = NeptuneOpenCypherQAChain.from_llm(
        llm=llm,
        graph=graph,
        extra_instructions="""
        Follow these instructions to build the query:
        1. Countries contain airports, not the other way around
        2. Use the airport code for identifying airports
        """
    )
    ```
    3coins authored Nov 17, 2023
    Configuration menu
    Copy the full SHA
    d2335d0 View commit details
    Browse the repository at this point in the history
  3. IMPROVEMENT WebResearchRetriever error handling in urls with connecti…

    …on error (#13401)
    
    - **Description:** Added a method `fetch_valid_documents` to
    `WebResearchRetriever` class that will test the connection for every url
    in `new_urls` and remove those that raise a `ConnectionError`.
    - **Issue:** [Previous
    PR](#13353),
      - **Dependencies:** None,
      - **Tag maintainer:** @efriis 
    
    Please make sure your PR is passing linting and testing before
    submitting. Run `make format`, `make lint` and `make test` to check this
    locally.
    
    See contribution guidelines for more information on how to write/run
    tests, lint, etc:
    
    https://github.com/langchain-ai/langchain/blob/master/.github/CONTRIBUTING.md
    
    If you're adding a new integration, please include:
    1. a test for the integration, preferably unit tests that do not rely on
    network access,
    2. an example notebook showing its use. It lives in `docs/extras`
    directory.
    
    If no one reviews your PR within a few days, please @-mention one of
    @baskaryan, @eyurtsev, @hwchase17.
    pedro-inf-custodio authored Nov 17, 2023
    Configuration menu
    Copy the full SHA
    0fb5f85 View commit details
    Browse the repository at this point in the history

Commits on Nov 18, 2023

  1. Add execution time (#13542)

    And warn instead of raising an error, since the chain API is too
    inconsistent.
    hinthornw authored Nov 18, 2023
    Configuration menu
    Copy the full SHA
    c56faa6 View commit details
    Browse the repository at this point in the history
  2. EXPERIMENTAL Generic LLM wrapper to support chat model interface with…

    … configurable chat prompt format (#8295)
    
    ## Update 2023-09-08
    
    This PR now supports further models in addition to Lllama-2 chat models.
    See [this comment](#issuecomment-1668988543) for further details. The
    title of this PR has been updated accordingly.
    
    ## Original PR description
    
    This PR adds a generic `Llama2Chat` model, a wrapper for LLMs able to
    serve Llama-2 chat models (like `LlamaCPP`,
    `HuggingFaceTextGenInference`, ...). It implements `BaseChatModel`,
    converts a list of chat messages into the [required Llama-2 chat prompt
    format](https://huggingface.co/blog/llama2#how-to-prompt-llama-2) and
    forwards the formatted prompt as `str` to the wrapped `LLM`. Usage
    example:
    
    ```python
    # uses a locally hosted Llama2 chat model
    llm = HuggingFaceTextGenInference(
        inference_server_url="http://127.0.0.1:8080/",
        max_new_tokens=512,
        top_k=50,
        temperature=0.1,
        repetition_penalty=1.03,
    )
    
    # Wrap llm to support Llama2 chat prompt format.
    # Resulting model is a chat model
    model = Llama2Chat(llm=llm)
    
    messages = [
        SystemMessage(content="You are a helpful assistant."),
        MessagesPlaceholder(variable_name="chat_history"),
        HumanMessagePromptTemplate.from_template("{text}"),
    ]
    
    prompt = ChatPromptTemplate.from_messages(messages)
    memory = ConversationBufferMemory(memory_key="chat_history", return_messages=True)
    chain = LLMChain(llm=model, prompt=prompt, memory=memory)
    
    # use chat model in a conversation
    # ...
    ```
    
    Also part of this PR are tests and a demo notebook.
    
    - Tag maintainer: @hwchase17
    - Twitter handle: `@mrt1nz`
    
    ---------
    
    Co-authored-by: Erick Friis <erick@langchain.dev>
    krasserm and Erick Friis authored Nov 18, 2023
    Configuration menu
    Copy the full SHA
    79ed66f View commit details
    Browse the repository at this point in the history
  3. Use random seed (#13544)

    For default eval llm
    hinthornw authored Nov 18, 2023
    Configuration menu
    Copy the full SHA
    cac849a View commit details
    Browse the repository at this point in the history
  4. Fix typo/line break in the middle of a word (#13314)

    - **Description:** a simple typo/extra line break fix
      - **Dependencies:** none
    marks authored Nov 18, 2023
    Configuration menu
    Copy the full SHA
    cda1b33 View commit details
    Browse the repository at this point in the history
  5. IMPROVEMENT Adds support for new OctoAI endpoints (#13521)

    small fix to add support for new OctoAI LLM endpoints
    AI-Bassem authored Nov 18, 2023
    Configuration menu
    Copy the full SHA
    ff382b7 View commit details
    Browse the repository at this point in the history
  6. BUG fixed openai_assistant namespace (#13543)

    BUG: langchain.agents.openai_assistant has a reference as
    `from langchain_experimental.openai_assistant.base import
    OpenAIAssistantRunnable`
    should be 
    `from langchain.agents.openai_assistant.base import
    OpenAIAssistantRunnable`
    
    This prevents building of the API Reference docs
    leo-gan authored Nov 18, 2023
    Configuration menu
    Copy the full SHA
    43dad6c View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    f4c0e3c View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    790ed8b View commit details
    Browse the repository at this point in the history
  9. bump 338, exp 42 (#13564)

    baskaryan authored Nov 18, 2023
    Configuration menu
    Copy the full SHA
    78a1f4b View commit details
    Browse the repository at this point in the history
Loading