You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/langchain/llms
Philipp Schmid 064be93edf
[Embeddings] Add SageMaker Endpoint Embedding class (#1859)
# What does this PR do? 

This PR adds similar to `llms` a SageMaker-powered `embeddings` class.
This is helpful if you want to leverage Hugging Face models on SageMaker
for creating your indexes.

I added a example into the
[docs/modules/indexes/examples/embeddings.ipynb](https://github.com/hwchase17/langchain/compare/master...philschmid:add-sm-embeddings?expand=1#diff-e82629e2894974ec87856aedd769d4bdfe400314b03734f32bee5990bc7e8062)
document. The example currently includes some `_### TEMPORARY: Showing
how to deploy a SageMaker Endpoint from a Hugging Face model ###_ ` code
showing how you can deploy a sentence-transformers to SageMaker and then
run the methods of the embeddings class.

@hwchase17 please let me know if/when i should remove the `_###
TEMPORARY: Showing how to deploy a SageMaker Endpoint from a Hugging
Face model ###_` in the description i linked to a detail blog on how to
deploy a Sentence Transformers so i think we don't need to include those
steps here.

I also reused the `ContentHandlerBase` from
`langchain.llms.sagemaker_endpoint` and changed the output type to `any`
since it is depending on the implementation.
1 year ago
..
__init__.py Sagemaker Endpoint LLM (#1686) 1 year ago
ai21.py Strange behavior with LLM import requirements (#1104) 1 year ago
aleph_alpha.py add aleph alpha llm (#1207) 1 year ago
anthropic.py cleanup (#1274) 1 year ago
bananadev.py Harrison/banana fix (#1311) 1 year ago
base.py (rfc) chat models (#1424) 1 year ago
cerebriumai.py cleanup (#1274) 1 year ago
cohere.py Update types in cohere.py (#1635) 1 year ago
deepinfra.py cleanup (#1274) 1 year ago
fake.py Harrison/fake llm (#990) 1 year ago
forefrontai.py cleanup (#1274) 1 year ago
gooseai.py cleanup (#1274) 1 year ago
huggingface_endpoint.py Harrison/hf inf error (#1543) 1 year ago
huggingface_hub.py cleanup (#1274) 1 year ago
huggingface_pipeline.py cleanup (#1274) 1 year ago
loading.py Harrison/improve cache (#368) 1 year ago
manifest.py Harrison/cache (#343) 1 year ago
modal.py cleanup (#1274) 1 year ago
nlpcloud.py cleanup (#1274) 1 year ago
openai.py Harrison/add warning to openaichat (#1781) 1 year ago
petals.py cleanup (#1274) 1 year ago
promptlayer_openai.py Adding ability to `return_pl_id` to all PromptLayer Models in LangChain (#1699) 1 year ago
sagemaker_endpoint.py [Embeddings] Add SageMaker Endpoint Embedding class (#1859) 1 year ago
self_hosted.py Harrison/self hosted runhouse (#1154) 1 year ago
self_hosted_hugging_face.py Harrison/self hosted runhouse (#1154) 1 year ago
stochasticai.py cleanup (#1274) 1 year ago
utils.py Harrison/cleanup env check (#144) 2 years ago
writer.py Add Writer, Banana, Modal, StochasticAI (#1270) 1 year ago