langchain/libs/experimental/langchain_experimental
Pranav Agarwal 86ae48b781
experimental[minor]: Amazon Personalize support (#17436)
## Amazon Personalize support on Langchain

This PR is a successor to this PR -
https://github.com/langchain-ai/langchain/pull/13216

This PR introduces an integration with [Amazon
Personalize](https://aws.amazon.com/personalize/) to help you to
retrieve recommendations and use them in your natural language
applications. This integration provides two new components:

1. An `AmazonPersonalize` client, that provides a wrapper around the
Amazon Personalize API.
2. An `AmazonPersonalizeChain`, that provides a chain to pull in
recommendations using the client, and then generating the response in
natural language.

We have added this to langchain_experimental since there was feedback
from the previous PR about having this support in experimental rather
than the core or community extensions.

Here is some sample code to explain the usage.

```python

from langchain_experimental.recommenders import AmazonPersonalize
from langchain_experimental.recommenders import AmazonPersonalizeChain
from langchain.llms.bedrock import Bedrock

recommender_arn = "<insert_arn>"

client=AmazonPersonalize(
    credentials_profile_name="default",
    region_name="us-west-2",
    recommender_arn=recommender_arn
)
bedrock_llm = Bedrock(
    model_id="anthropic.claude-v2", 
    region_name="us-west-2"
)

chain = AmazonPersonalizeChain.from_llm(
    llm=bedrock_llm, 
    client=client
)
response = chain({'user_id': '1'})
```


Reviewer: @3coins
2024-02-19 10:36:37 -08:00
..
agents experimental[patch]: fix zero-shot pandas agent (#17442) 2024-02-12 21:58:35 -08:00
autonomous_agents infra: add print rule to ruff (#16221) 2024-02-09 16:13:30 -08:00
chat_models docs, community[patch], experimental[patch], langchain[patch], cli[pa… (#15412) 2024-01-02 15:32:16 -05:00
comprehend_moderation core[minor], langchain[patch], experimental[patch]: Added missing py.typed to langchain_core (#14143) 2023-12-01 19:15:23 -08:00
cpal docs, experimental[patch], langchain[patch], community[patch]: update storage imports (#15429) 2024-01-02 16:47:11 -05:00
data_anonymizer core[patch]: Support .yml extension for YAML (#16783) 2024-02-12 19:57:20 -08:00
fallacy_removal docs, community[patch], experimental[patch], langchain[patch], cli[pa… (#15412) 2024-01-02 15:32:16 -05:00
generative_agents langchain[patch], experimental[patch]: replace langchain.schema imports (#15410) 2024-01-02 15:09:45 -05:00
graph_transformers docs, experimental[patch], langchain[patch], community[patch]: update storage imports (#15429) 2024-01-02 16:47:11 -05:00
llm_bash langchain[patch], experimental[patch]: update utilities imports (#15438) 2024-01-03 02:18:15 -05:00
llm_symbolic_math docs, community[patch], experimental[patch], langchain[patch], cli[pa… (#15412) 2024-01-02 15:32:16 -05:00
llms docs, community[patch], experimental[patch], langchain[patch], cli[pa… (#15412) 2024-01-02 15:32:16 -05:00
open_clip langchain[patch], experimental[patch]: replace langchain.schema imports (#15410) 2024-01-02 15:09:45 -05:00
openai_assistant Move OAI assistants to langchain and add callbacks (#13236) 2023-11-13 17:42:07 -08:00
pal_chain experimental[patch]: Enhance protection against arbitrary code execution in PALChain (#17091) 2024-02-14 11:44:07 -08:00
plan_and_execute langchain[patch], experimental[patch]: replace langchain.schema imports (#15410) 2024-01-02 15:09:45 -05:00
prompt_injection_identifier docs: docstrings langchain_community update (#14889) 2023-12-19 08:58:24 -05:00
prompts core[patch]: Support .yml extension for YAML (#16783) 2024-02-12 19:57:20 -08:00
pydantic_v1
recommenders experimental[minor]: Amazon Personalize support (#17436) 2024-02-19 10:36:37 -08:00
retrievers
rl_chain
smart_llm experimental[patch]: Fixed typos in SmartLLMChain ideation and critique prompts (#11507) 2024-02-14 13:20:10 -08:00
sql community[minor]: SQLDatabase Add fetch mode cursor, query parameters, query by selectable, expose execution options, and documentation (#17191) 2024-02-07 22:23:43 -05:00
synthetic_data langchain[patch], experimental[patch]: replace langchain.schema imports (#15410) 2024-01-02 15:09:45 -05:00
tabular_synthetic_data docs, community[patch], experimental[patch], langchain[patch], cli[pa… (#15412) 2024-01-02 15:32:16 -05:00
tools Propagate context vars in all classes/methods 2023-12-29 12:34:03 -08:00
tot core[patch], langchain[patch]: fix required deps (#14373) 2023-12-07 14:24:58 -08:00
utilities
__init__.py
py.typed
text_splitter.py experimental[patch]: Fixes issue #17060 (#17062) 2024-02-05 16:18:57 -08:00