crewAIInc / crewAI

Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.
https://crewai.com
MIT License
19.13k stars 2.64k forks source link

Add AWS as an Embedder Provider (required for Memory configuration) #637

Open dgallitelli opened 3 months ago

dgallitelli commented 3 months ago

In order to configure a Crew with memory=True without a OpenAI API Key, one needs to configure an Embedder provider. Currently, AWS (Amazon Bedrock and Amazon SageMaker) are not supported providers.

Ask

Things to note

Provider aws_bedrock is already supported in llm configuration, e.g.:

semantic_search_resume = MDXSearchTool(
    mdx='./fake_resume.md',
    config=dict(
        llm=dict(
            provider="aws_bedrock", # <=== WORKS!
            config=dict(
                model="anthropic.claude-3-haiku-20240307-v1:0",
                # Optional parameters can be included here.
                # temperature=0.5,
                # top_p=1,
                # stream=true,
            ),
        ),
        embedder=dict(
            provider="aws_bedrock", <=== DOES NOT WORK!
            config=dict(
                model="cohere.embed-english-v3",
                task_type="retrieval_document",
                # Optional title for the embeddings can be added here.
                # title="Embeddings",
            ),
        ),
    )
)
chappers00 commented 1 month ago

Watching - would very much appreciate this feature

github-actions[bot] commented 2 weeks ago

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

dgallitelli commented 2 weeks ago

Still relevant