Commit Graph

2664 Commits (multi_strategy_parser)
 

Author SHA1 Message Date
Harrison Chase 7414e9d196
bump version to 206 (#6465) 12 months ago
Hubert 22601b0b63
fix neo4j schema query (#6381)
Fix issue #6380 

<!-- Remove if not applicable -->

Fixes #6380  (issue)

#### Before submitting

<!-- If you're adding a new integration, please include:

1. a test for the integration - favor unit tests that does not rely on
network access.
2. an example notebook showing its use


See contribution guidelines for more information on how to write tests,
lint
etc:


https://github.com/hwchase17/langchain/blob/master/.github/CONTRIBUTING.md
-->

#### Who can review?

Tag maintainers/contributors who might be interested:
@hwchase17

<!-- For a quicker response, figure out the right person to tag with @

  @hwchase17 - project lead

  Tracing / Callbacks
  - @agola11

  Async
  - @agola11

  DataLoaders
  - @eyurtsev

  Models
  - @hwchase17
  - @agola11

  Agents / Tools / Toolkits
  - @hwchase17

  VectorStores / Retrievers / Memory
  - @dev2049

 -->

---------

Co-authored-by: HubertKl <HubertKl>
12 months ago
Gavin b0d80c4b3e
Update serpapi.py Support baidu list type answer_box (#6386)
Support baidu list type answer_box

From [this document](https://serpapi.com/baidu-answer-box), we can know
that the answer_box attribute returned by the Baidu interface is a list,
and the list contains only one Object, but an error will occur when the
current code is executed.

So when answer_box is a list, we reset res["answer_box"] so that the
code can execute successfully.
12 months ago
Bryce Drennan 384fa43fc3
fix: llm caching for replicate (#6396)
Caching wasn't accounting for which model was used so a result for the
first executed model would return for the same prompt on a different
model.

This was because `Replicate._identifying_params` did not include the
`model` parameter.

FYI
- @cbh123
- @hwchase17
- @agola11
12 months ago
Zeeland 8a604b93ab
feat: use latest duckduckgo_search API to call (#6409)
# Provider the latest duckduckgo_search API

The Git commit contents involve two files related to some DuckDuckGo
query operations, and an upgrade of the DuckDuckGo module to version
3.8.3. A suitable commit message could be "Upgrade DuckDuckGo module to
version 3.8.3, including query operations". Specifically, in the
duckduckgo_search.py file, a DDGS() class instance is newly added to
replace the previous ddg() function, and the time parameter name in the
get_snippets() and results() methods is changed from "time" to
"timelimit" to accommodate recent changes. In the pyproject.toml file,
the duckduckgo-search module is upgraded to version 3.8.3.

[duckduckgo_search readme
attention](https://github.com/deedy5/duckduckgo_search): Versions before
v2.9.4 no longer work as of May 12, 2023

## Who can review?

@vowelparrot

---------

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
12 months ago
Harrison Chase 9eec7c3206
Harrison/unstructured page number (#6464)
Co-authored-by: Reza Sanaie <reza@sanaie.ca>
12 months ago
Alonso Silva Allende b82ddf9cfb
Improve error message (#6275)
Trying to use OpenAI models like 'text-davinci-002' or
'text-davinci-003' the agent doesn't work and the message is 'Only
supported with OpenAI models.' The error message should be 'Only
supported with ChatOpenAI models.'

My Twitter handle is @alonsosilva
<!--
Thank you for contributing to LangChain! Your PR will appear in our
release under the title you set. Please make sure it highlights your
valuable contribution.

Replace this with a description of the change, the issue it fixes (if
applicable), and relevant context. List any dependencies required for
this change.

After you're done, someone will review your PR. They may suggest
improvements. If no one reviews your PR within a few days, feel free to
@-mention the same people again, as notifications can get lost.

Finally, we'd love to show appreciation for your contribution - if you'd
like us to shout you out on Twitter, please also include your handle!
-->

<!-- Remove if not applicable -->

Fixes # (issue)

#### Before submitting

<!-- If you're adding a new integration, please include:

1. a test for the integration - favor unit tests that does not rely on
network access.
2. an example notebook showing its use


See contribution guidelines for more information on how to write tests,
lint
etc:


https://github.com/hwchase17/langchain/blob/master/.github/CONTRIBUTING.md
-->

#### Who can review?

Tag maintainers/contributors who might be interested:
@hwchase17

<!-- For a quicker response, figure out the right person to tag with @

  @hwchase17 - project lead

  Tracing / Callbacks
  - @agola11

  Async
  - @agola11

  DataLoaders
  - @eyurtsev

  Models
  - @hwchase17
  - @agola11

  Agents / Tools / Toolkits
  - @hwchase17

  VectorStores / Retrievers / Memory
  - @dev2049

 -->

Co-authored-by: SILVA Alonso <alonso.silva@nokia-bell-labs.com>
Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
12 months ago
zengbo 7e5f5ebf86
Fix the issue where ANTHROPIC_API_URL set in environment is not takin… (#6400)
I apologize for the error: the 'ANTHROPIC_API_URL' environment variable
doesn't take effect if the 'anthropic_api_url' parameter has a default
value.

#### Who can review?
  Models
  - @hwchase17
  - @agola11
12 months ago
Grayson Adkins 9f5f747dc3
Fix broken links in autonomous agents docs (#6398)
Fixes broken links here:  
https://python.langchain.com/docs/use_cases/autonomous_agents.html

#### Who can review?

Tag maintainers/contributors who might be interested:

  Agents / Tools / Toolkits
  - @hwchase17
12 months ago
volodymyr-memsql d2e9b621ab
Update SinglStoreDB vectorstore (#6423)
1. Introduced new distance strategies support: **DOT_PRODUCT** and
**EUCLIDEAN_DISTANCE** for enhanced flexibility.
2. Implemented a feature to filter results based on metadata fields.
3. Incorporated connection attributes specifying "langchain python sdk"
usage for enhanced traceability and debugging.
4. Expanded the suite of integration tests for improved code
reliability.
5. Updated the existing notebook with the usage example

@dev2049

---------

Co-authored-by: Volodymyr Tkachuk <vtkachuk-ua@singlestore.com>
Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
12 months ago
Avinash Raj 6efd5fa2b9
Fix for #6431 - chatprompt template with partial variables giing validation error (#6456)
W.r.t recent changes, ChatPromptTemplate does not accepting partial
variables. This PR should fix that issue.


Fixes #6431




#### Who can review?



  @hwchase17

---------

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
12 months ago
Harrison Chase 02c0a1e77e
Harrison/functions in retrieval (#6463) 12 months ago
Swapnil Sharma dc4ffa8d9b
Incorrect argument count handling (#5543)
Throwing ToolException when incorrect arguments are passed to tools so
that that agent can course correct them.

# Incorrect argument count handling

I was facing an error where the agent passed incorrect arguments to
tools. As per the discussions going around, I started throwing
ToolException to allow the model to course correct.

## Before submitting

<!-- If you're adding a new integration, please include:

1. a test for the integration - favor unit tests that does not rely on
network access.
2. an example notebook showing its use


See contribution guidelines for more information on how to write tests,
lint
etc:


https://github.com/hwchase17/langchain/blob/master/.github/CONTRIBUTING.md
-->

## Who can review?

Community members can review the PR once tests pass. Tag
maintainers/contributors who might be interested:

<!-- For a quicker response, figure out the right person to tag with @

  @hwchase17 - project lead

  Tracing / Callbacks
  - @agola11

  Async
  - @agola11

  DataLoaders
  - @eyurtsev

  Models
  - @hwchase17
  - @agola11

  Agents / Tools / Toolkits
  - @vowelparrot

  VectorStores / Retrievers / Memory
  - @dev2049

 -->

---------

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
12 months ago
kYLe 3a58c4c3a0
Fixed a link typo /-/route -> /-/routes. and change endpoint format (#6186)
<!--
Thank you for contributing to LangChain! Your PR will appear in our
release under the title you set. Please make sure it highlights your
valuable contribution.

Replace this with a description of the change, the issue it fixes (if
applicable), and relevant context. List any dependencies required for
this change.

After you're done, someone will review your PR. They may suggest
improvements. If no one reviews your PR within a few days, feel free to
@-mention the same people again, as notifications can get lost.

Finally, we'd love to show appreciation for your contribution - if you'd
like us to shout you out on Twitter, please also include your handle!
-->

<!-- Remove if not applicable -->

Fixes a link typo from `/-/route` to `/-/routes`. 
and change endpoint format
from `f"{self.anyscale_service_url}/{self.anyscale_service_route}"` to
`f"{self.anyscale_service_url}{self.anyscale_service_route}"`
Also adding documentation about the format of the endpoint
#### Before submitting

<!-- If you're adding a new integration, please include:

1. a test for the integration - favor unit tests that does not rely on
network access.
2. an example notebook showing its use


See contribution guidelines for more information on how to write tests,
lint
etc:


https://github.com/hwchase17/langchain/blob/master/.github/CONTRIBUTING.md
-->

#### Who can review?

Tag maintainers/contributors who might be interested:

<!-- For a quicker response, figure out the right person to tag with @

  @hwchase17 - project lead

  Tracing / Callbacks
  - @agola11

  Async
  - @agola11

  DataLoaders
  - @eyurtsev

  Models
  - @hwchase17
  - @agola11

  Agents / Tools / Toolkits
  - @hwchase17

  VectorStores / Retrievers / Memory
  - @dev2049

 -->

---------

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
12 months ago
Leonid Ganeline 03b16ed2b1
docs `retrievers` fixes (#6299)
Fixed several inconsistencies:
- file names and notebook titles should be similar otherwise ToC on the
[retrievers
page](https://python.langchain.com/en/latest/modules/indexes/retrievers.html)
and on the left ToC tab are different. For example, now, `Self-querying
with Chroma` is not correctly alphabetically sorted because its file
named `chroma_self_query.ipynb`
- `Stringing compressors and document transformers...` demoted from `#`
to `##`. Otherwise, it appears in Toc.
- several formatting problems

#### Who can review?

@hwchase17 
@dev2049

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
12 months ago
M. Tolga Cangöz bccee85c8f
Update introduction.mdx (#6425)
Fix typo
12 months ago
Nir Gazit 95b77a5215
Fix Custom LLM Agent example (#6429)
<!--
Thank you for contributing to LangChain! Your PR will appear in our
release under the title you set. Please make sure it highlights your
valuable contribution.

Replace this with a description of the change, the issue it fixes (if
applicable), and relevant context. List any dependencies required for
this change.

After you're done, someone will review your PR. They may suggest
improvements. If no one reviews your PR within a few days, feel free to
@-mention the same people again, as notifications can get lost.

Finally, we'd love to show appreciation for your contribution - if you'd
like us to shout you out on Twitter, please also include your handle!
-->

The `CustomOutputParser` needs to throw `OutputParserException` when it
fails to parse the response from the agent, so that the executor can
[catch it and
retry](be9371ca8f/langchain/agents/agent.py (L767))
when `handle_parsing_errors=True`.

<!-- Remove if not applicable -->

#### Who can review?

Tag maintainers/contributors who might be interested: @hwchase17

<!-- For a quicker response, figure out the right person to tag with @

  @hwchase17 - project lead

  Tracing / Callbacks
  - @agola11

  Async
  - @agola11

  DataLoaders
  - @eyurtsev

  Models
  - @hwchase17
  - @agola11

  Agents / Tools / Toolkits
  - @hwchase17

  VectorStores / Retrievers / Memory
  - @dev2049

 -->
12 months ago
ykerus b697bbb5b5
Remove backticks without clear purpose from docs (#6442)
#### Description

- Removed two backticks surrounding the phrase "chat messages as"
- This phrase stood out among other formatted words/phrases such as
`prompt`, `role`, `PromptTemplate`, etc., which all seem to have a clear
function.
- `chat messages as`, formatted as such, confused me while reading,
leading me to believe the backticks were misplaced.

#### Who can review?

@hwchase17
<!-- For a quicker response, figure out the right person to tag with @

  @hwchase17 - project lead

  Tracing / Callbacks
  - @agola11

  Async
  - @agola11

  DataLoaders
  - @eyurtsev

  Models
  - @hwchase17
  - @agola11

  Agents / Tools / Toolkits
  - @hwchase17

  VectorStores / Retrievers / Memory
  - @dev2049

 -->
12 months ago
Dhruvil Shah 9494623869
Update web_base.ipynb (#6430)
Minor new line character in the markdown.

Also, this option is not yet in the latest version of LangChain
(0.0.190) from Conda. Maybe in the next update.

@eyurtsev
@hwchase17
12 months ago
Wenchen Li 76ae9da9db
Add `_similarity_search_with_relevance_scores` in `Pinecone` (#6446)
Just so it is consistent with other `VectorStore` classes.

This is a follow-up of #6056 which also discussed the potential of
adding `similarity_search_by_vector_returning_embeddings` that we will
continue the discussion here.

potentially related: #6286 


#### Who can review?

Tag maintainers/contributors who might be interested: @rlancemartin 

<!-- For a quicker response, figure out the right person to tag with @

  @hwchase17 - project lead

  Tracing / Callbacks
  - @agola11

  Async
  - @agola11

  DataLoaders
  - @eyurtsev

  Models
  - @hwchase17
  - @agola11

  Agents / Tools / Toolkits
  - @hwchase17

  VectorStores / Retrievers / Memory
  - @dev2049

 -->
12 months ago
Ismail Pelaseyed d4e8e0f5ab
Add example for question answering over documents with OpenAI Function Agent (#6448)
This PR adds an example of doing question answering over documents using
OpenAI Function Agents.

#### Who can review?

@hwchase17

---------

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
12 months ago
Andrey Avtomonov 68a675cc68
Remove extra word in the introduction documentation (#6450)
Removed an extra word in the introduction documentation, a simple typo
12 months ago
Ankush Gola a9246333fd
fix anthropic chat model mutating input list (#6457)
<!--
Thank you for contributing to LangChain! Your PR will appear in our
release under the title you set. Please make sure it highlights your
valuable contribution.

Replace this with a description of the change, the issue it fixes (if
applicable), and relevant context. List any dependencies required for
this change.

After you're done, someone will review your PR. They may suggest
improvements. If no one reviews your PR within a few days, feel free to
@-mention the same people again, as notifications can get lost.

Finally, we'd love to show appreciation for your contribution - if you'd
like us to shout you out on Twitter, please also include your handle!
-->

<!-- Remove if not applicable -->

Fixes: ChatAnthropic was mutating the input message list during
formatting which isn't ideal bc you could be changing the behavior for
other chat models when using the same input

#### Before submitting

<!-- If you're adding a new integration, please include:

1. a test for the integration - favor unit tests that does not rely on
network access.
2. an example notebook showing its use


See contribution guidelines for more information on how to write tests,
lint
etc:


https://github.com/hwchase17/langchain/blob/master/.github/CONTRIBUTING.md
-->

#### Who can review?

Tag maintainers/contributors who might be interested:
12 months ago
Zander Chase bc0af67aaf
Add Trajectory Eval RunEvaluator (#6449) 12 months ago
Hakan Tekgul 6a157cf8bb
Update arize_callback.py (#6433)
Arize released a new Generative LLM Model Type, adjusting the callback
function to new logging.

Added arize imports, please delete if not necessary.

Specifically, this change makes sure that the prompt and response pairs
from LangChain agents are logged into Arize as a Generative LLM model,
instead of our previous categorical model. In order to do this, the
callback functions collects the necessary data and passes the data into
Arize using Python Pandas SDK.

Arize library, specifically pandas.logger is an additional dependency.

Notebook For Test:
https://docs.arize.com/arize/resources/integrations/langchain

Who can review?
Tag maintainers/contributors who might be interested:

@hwchase17 - project lead

Tracing / Callbacks

@agola11
12 months ago
Zander Chase 00f276d23f
Run eval in eval mode (#6447)
For the `run_on_dataset` sessions
12 months ago
Harrison Chase 1300a4bc8c
expose docs chains (#6453) 12 months ago
Harrison Chase 286452c7f0 remove mongo 12 months ago
David Duong be9371ca8f
Include placeholder value for all secrets, not just kwargs (#6421)
Mirror PR for https://github.com/hwchase17/langchainjs/pull/1696

Secrets passed via environment variables should be present in the
serialised chain
12 months ago
Harrison Chase df40cd233f
bump version to 205 (#6410) 12 months ago
Harrison Chase e9c2b280db
Harrison/refactor functions (#6408) 12 months ago
Harrison Chase 6a4a950a3c
changes to llm chain (#6328)
- return raw and full output (but keep run shortcut method functional)
- change output parser to take in generations (good for working with
messages)
- add output parser to base class, always run (default to same as
current)

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
12 months ago
Davis Chase d3c2eab0b3
Docs nit (#6350) 12 months ago
Davis Chase af96de6552
fix prod docs build (#6402) 12 months ago
Fei Wang 50556f3b35
support memory for functions (#6165)
#### Before submitting
Add memory support for `OpenAIFunctionsAgent` like
`StructuredChatAgent`.


#### Who can review?
 @hwchase17

---------

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
12 months ago
Dhruvil Shah b2b9ded12f
Update web_base.py _fetch() method For SiteMapLoader (#6256)
A must-include for SiteMap Loader to avoid the SSL verification error.
Setting the 'verify' to False by ``` sitemap_loader.requests_kwargs =
{"verify": False}``` does not bypass the SSL verification in some
websites.

There are websites (https:// researchadmin.asu.edu/ sitemap.xml) where
setting "verify" to False as shown below would not work:
sitemap_loader.requests_kwargs = {"verify": False} 

We need this merge to tell the Session to use a connector with a
specific argument about SSL:
 \# For SiteMap SSL verification
if not self.request_kwargs['verify']:
    connector = aiohttp.TCPConnector(ssl=False)
else:
    connector = None
 
<!--
Thank you for contributing to LangChain! Your PR will appear in our
release under the title you set. Please make sure it highlights your
valuable contribution.

Replace this with a description of the change, the issue it fixes (if
applicable), and relevant context. List any dependencies required for
this change.

After you're done, someone will review your PR. They may suggest
improvements. If no one reviews your PR within a few days, feel free to
@-mention the same people again, as notifications can get lost.

Finally, we'd love to show appreciation for your contribution - if you'd
like us to shout you out on Twitter, please also include your handle!
-->

Fixes #5483 

#### Before submitting

<!-- If you're adding a new integration, please include:

1. a test for the integration - favor unit tests that does not rely on
network access.
2. an example notebook showing its use


See contribution guidelines for more information on how to write tests,
lint
etc:


https://github.com/hwchase17/langchain/blob/master/.github/CONTRIBUTING.md
-->

#### Who can review?

Tag maintainers/contributors who might be interested:

@hwchase17 
@eyurtsev

---------

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
12 months ago
Harrison Chase 10bff4ecc4
Harrison/chroma fix (#6390)
Co-authored-by: Junu Moon(Fran) <francomoon7@gmail.com>
12 months ago
Harrison Chase 5c1fa3e70e
Harrison/typesense fix (#6391)
Co-authored-by: Gaurav Chauhan <2796gaurav@gmail.com>
Co-authored-by: gaurav <gaurav.chauhan1@rksv.in>
12 months ago
Harrison Chase 5ccebce777
rm pandas from arize (#6392) 12 months ago
matias-biatoz 3b7c4c51d5
Added gpt-3.5-turbo 0613 16k and 16k-0613 pricing (#6287)
@agola11 

Issue
#6193 

I added the new pricing for the new models.

Also, now gpt-3.5-turbo got split into "input" and "output" pricing. It
currently does not support that.
12 months ago
Ly Nguyen 1e0af59f69
- Fix pass system_message argument in new feature openai_functions_agent (#6297)
can't pass system_message argument, the prompt always show default
message "System: You are a helpful AI assistant."
```
system_message = SystemMessage(
    content="You are an AI that provides information to Human regarding documentation."
)
agent = initialize_agent(
    tools,
    llm=openai_llm_chat,
    agent=AgentType.OPENAI_FUNCTIONS,
    system_message=system_message,
    agent_kwargs={
        "system_message": system_message,
    },
    verbose=False,
)
```

#### Who can review?

Tag maintainers/contributors who might be interested:

<!-- For a quicker response, figure out the right person to tag with @

  @hwchase17 - project lead

  Tracing / Callbacks
  - @agola11

  Async
  - @agola11

  DataLoaders
  - @eyurtsev

  Models
  - @hwchase17
  - @agola11

  Agents / Tools / Toolkits
  - @hwchase17

  VectorStores / Retrievers / Memory
  - @dev2049

 -->
12 months ago
georgian e64bafed3a
Fixes typo in Vectara.similarity_search (#6277)
Fixes a simple typo.

@hwchase17
@dev2049

Co-authored-by: Georgian Sarghi <georgian.sarghi@gmail.com>
12 months ago
Ted 112695e4da
Iterate through filtered file types instead of all listed files (#6258)
# Iterate through filtered file types instead of all listed files

Fixes https://github.com/hwchase17/langchain/issues/6257

https://github.com/hwchase17/langchain/pull/4926 originally added the
functionality to filter by file type, storing the filtered files in
`_files`

https://github.com/hwchase17/langchain/pull/5220 removed the
functionality when adding code to filter trashed files by using the
`files` variables instead of the `_files` variable.

This PR simply adds the functionality back by using `_files` again.

#### Who can review?

@hwchase17 - project lead
@eyurtsev
12 months ago
Dhruvil Shah ba90e3c990
Update web_base.ipynb for guiding purposes (#6248)
To bypass SSL verification errors during fetching, you can include the
`verify=False` parameter. This markdown proves useful, especially for
beginners in the field of web scraping.

<!--
Thank you for contributing to LangChain! Your PR will appear in our
release under the title you set. Please make sure it highlights your
valuable contribution.

Replace this with a description of the change, the issue it fixes (if
applicable), and relevant context. List any dependencies required for
this change.

After you're done, someone will review your PR. They may suggest
improvements. If no one reviews your PR within a few days, feel free to
@-mention the same people again, as notifications can get lost.

Finally, we'd love to show appreciation for your contribution - if you'd
like us to shout you out on Twitter, please also include your handle!
-->

Fixes #6079 

#### Who can review?

Tag maintainers/contributors who might be interested:
@hwchase17 
@eyurtsev

---------

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
12 months ago
Dhruvil Shah 92f05a67a4
Add markdown to specify important arguments (#6246)
To bypass SSL verification errors during web scraping, you can include
the ssl_verify=False parameter along with the headers parameter. This
combination of arguments proves useful, especially for beginners in the
field of web scraping.

<!--
Thank you for contributing to LangChain! Your PR will appear in our
release under the title you set. Please make sure it highlights your
valuable contribution.

Replace this with a description of the change, the issue it fixes (if
applicable), and relevant context. List any dependencies required for
this change.

After you're done, someone will review your PR. They may suggest
improvements. If no one reviews your PR within a few days, feel free to
@-mention the same people again, as notifications can get lost.

Finally, we'd love to show appreciation for your contribution - if you'd
like us to shout you out on Twitter, please also include your handle!
-->

Fixes #1829 

#### Before submitting

<!-- If you're adding a new integration, please include:

1. a test for the integration - favor unit tests that does not rely on
network access.
2. an example notebook showing its use


See contribution guidelines for more information on how to write tests,
lint
etc:


https://github.com/hwchase17/langchain/blob/master/.github/CONTRIBUTING.md
-->

#### Who can review?

Tag maintainers/contributors who might be interested:
@hwchase17 @eyurtsev 
 -->

---------

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
12 months ago
ikebo ca7a44d024
add max_context_size property in BaseOpenAI (#6239)
Hi, I make a small improvement for BaseOpenAI.

I added a max_context_size attribute to BaseOpenAI so that we can get
the max context size directly instead of only getting the maximum token
size of the prompt through the max_tokens_for_prompt method.

Who can review?
@hwchase17 @agola11

I followed the [Common
Tasks](c7db9febb0/.github/CONTRIBUTING.md),
the test is all passed.

---------

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
12 months ago
Jan Pawellek 3e3ed8c5c9
Fix LLM types so that they can be loaded from config dicts (#6235)
LLM configurations can be loaded from a Python dict (or JSON file
deserialized as dict) using the
[load_llm_from_config](8e1a7a8646/langchain/llms/loading.py (L12))
function.

However, the type string in the `type_to_cls_dict` lookup dict differs
from the type string defined in some LLM classes. This means that the
LLM object can be saved, but not loaded again, because the type strings
differ.
12 months ago
Shu 46782ad79b
Fixed an unhandled error that was raised when DynamoDB did not have any chat history. (#6141)
<!--
Thank you for contributing to LangChain! Your PR will appear in our
release under the title you set. Please make sure it highlights your
valuable contribution.



After you're done, someone will review your PR. They may suggest
improvements. If no one reviews your PR within a few days, feel free to
@-mention the same people again, as notifications can get lost.

Finally, we'd love to show appreciation for your contribution - if you'd
like us to shout you out on Twitter, please also include your handle!
-->

The current version of chat history with DynamoDB doesn't handle the
case correctly when a table has no chat history. This change solves this
error handling.

<!-- Remove if not applicable -->

Fixes https://github.com/hwchase17/langchain/issues/6088

#### Who can review?

Tag maintainers/contributors who might be interested:

@hwchase17

<!-- For a quicker response, figure out the right person to tag with @

  @hwchase17 - project lead

  Tracing / Callbacks
  - @agola11

  Async
  - @agola11

  DataLoaders
  - @eyurtsev

  Models
  - @hwchase17
  - @agola11

  Agents / Tools / Toolkits
  - @hwchase17

  VectorStores / Retrievers / Memory
  - @dev2049

 -->
12 months ago
Cameron Vetter 2286204354
Correct AzureSearch Vector Store not applying search_kwargs when searching (#6132)
Fixes #6131 

Simply passes kwargs forward from similarity_search to helper functions
so that search_kwargs are applied to search as originally intended. See
bug for repro steps.

#### Who can review?
  @hwchase17
  @dev2049 

Twitter: poshporcupine
12 months ago
Pierre Dulac 395a2a3724
Fix typo in the CAI critique prompt (#6123)
Very small typo in the Constitutional AI critique default prompt. The
negation "If there is *no* material critique of ..." is used two times,
should be used only on the first one.

Cheers,
Pierre
12 months ago