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/langchainjs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.0.185
Choose a base ref
...
head repository: langchain-ai/langchainjs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.0.186
Choose a head ref
  • 11 commits
  • 29 files changed
  • 3 contributors

Commits on Nov 10, 2023

  1. Update publish command

    jacoblee93 committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    038f817 View commit details
    Browse the repository at this point in the history
  2. Update concurrency

    jacoblee93 committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    042e887 View commit details
    Browse the repository at this point in the history
  3. Release 0.0.185

    jacoblee93 committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    af44c3c View commit details
    Browse the repository at this point in the history
  4. Merge pull request #3219 from langchain-ai/release

    Release 0.0.185
    jacoblee93 authored Nov 10, 2023
    Configuration menu
    Copy the full SHA
    808b496 View commit details
    Browse the repository at this point in the history
  5. Update cookbook (#3220)

    jacoblee93 authored Nov 10, 2023
    Configuration menu
    Copy the full SHA
    ccb6a44 View commit details
    Browse the repository at this point in the history
  6. Update docs (#3227)

    * Update cookbook
    
    * Update docs
    jacoblee93 authored Nov 10, 2023
    Configuration menu
    Copy the full SHA
    c9822e3 View commit details
    Browse the repository at this point in the history

Commits on Nov 11, 2023

  1. Fix chat prompt serialization (#3230)

    * Update cookbook
    
    * Fix chat prompt output serialization
    jacoblee93 authored Nov 11, 2023
    Configuration menu
    Copy the full SHA
    92ead3a View commit details
    Browse the repository at this point in the history
  2. Adds JSON mode to Ollama and ChatOllama (#3229)

    * Update cookbook
    
    * Adds format option to Ollama
    
    * Fix type
    
    * Format
    
    * Factor out utility type
    
    * Update docs
    jacoblee93 authored Nov 11, 2023
    Configuration menu
    Copy the full SHA
    cf84bf2 View commit details
    Browse the repository at this point in the history
  3. Fix delta role error when using custom LLM (#3223)

    * Fix delta role error when using custom LLM
    
    This addresses a delta chunk issue that happens when you use a custom baseURL on the openai chat model. Some models like llama 2 on openrouter may have a empty delta and result in a undefined error.
    
    Example error:
    ```
    Cannot read properties of undefined (reading 'role')",
      "error.stack": "TypeError: Cannot read properties of undefined (reading 'role')\n    at _convertDeltaToMessageChunk (/home/ubuntu/node_modules/langchain/dist/chat_models/openai.cjs:72:24)\n    at ChatOpenAI._streamResponseChunks (/home/ubuntu/node_modules/langchain/dist/chat_models/openai.cjs:409:27)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async ChatOpenAI._streamIterator (/home/ubuntu/node_modules/langchain/dist/chat_models/base.cjs:77:34)\n    at async RunnableSequence._streamIterator (/home/ubuntu/node_modules/langchain/dist/schema/runnable/base.cjs:780:30)\n    at async Object.pull (/home/ubuntu/node_modules/langchain/dist/util/stream.cjs:73:41)
    ```
    
    on _convertDeltaToMessageChunk, openai works fine but when you start using models from openrouter or other baseURL llms, it doesnt take in account for empty deltas and assumes theres always a value.
    
    I was able to test with a custom baseURL and normal openai that this works with no errors on streaming after this tweak.
    
    * add default role
    
    * add ? on chunk text for streaming delta
    
    * Simpler fix
    
    * Revert
    
    ---------
    
    Co-authored-by: jacoblee93 <[email protected]>
    ninjamaster1337 and jacoblee93 authored Nov 11, 2023
    Configuration menu
    Copy the full SHA
    719a131 View commit details
    Browse the repository at this point in the history
  4. Brace/runnable chain (#3200)

    * Runnable support for LLMChains
    
    * fix typing
    
    * nit
    
    * nit
    
    * fix build & typing
    
    * chore: lint files
    
    * cr
    
    * cr
    
    * cr
    
    * no instance of
    
    * Adds type guard
    
    * fix signal bug
    
    * cr
    
    * cr
    
    ---------
    
    Co-authored-by: jacoblee93 <[email protected]>
    bracesproul and jacoblee93 authored Nov 11, 2023
    Configuration menu
    Copy the full SHA
    0cb640f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3289345 View commit details
    Browse the repository at this point in the history
Loading