Arcee
Arcee helps with the development of the SLMs—small, specialized, secure, and scalable language models.
This notebook demonstrates how to use the ArceeRetriever
class to retrieve relevant document(s) for Arcee's Domain Adapted Language Models
(DALMs
).
Setup​
Before using ArceeRetriever
, make sure the Arcee API key is set as ARCEE_API_KEY
environment variable. You can also pass the api key as a named parameter.
from langchain_community.retrievers import ArceeRetriever
retriever = ArceeRetriever(
model="DALM-PubMed",
# arcee_api_key="ARCEE-API-KEY" # if not already set in the environment
)
API Reference:ArceeRetriever
Additional Configuration​
You can also configure ArceeRetriever
's parameters such as arcee_api_url
, arcee_app_url
, and model_kwargs
as needed.
Setting the model_kwargs
at the object initialization uses the filters and size as default for all the subsequent retrievals.
retriever = ArceeRetriever(
model="DALM-PubMed",
# arcee_api_key="ARCEE-API-KEY", # if not already set in the environment
arcee_api_url="https://custom-api.arcee.ai", # default is https://api.arcee.ai
arcee_app_url="https://custom-app.arcee.ai", # default is https://app.arcee.ai
model_kwargs={
"size": 5,
"filters": [
{
"field_name": "document",
"filter_type": "fuzzy_search",
"value": "Einstein",
}
],
},
)