Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anthropic module is required when not using it #64

Closed
Atharv24 opened this issue Dec 16, 2024 · 5 comments
Closed

Anthropic module is required when not using it #64

Atharv24 opened this issue Dec 16, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@Atharv24
Copy link

Hi, I added pipecat flows to my existing pipecat-ai workflow. I am using Silero, Deepgram, OpenAI and Daily for my project.

After installing pipecat-ai-flows, i tried running an example but got an import error for Anthropic.

@markbackman
Copy link
Contributor

Hey @Atharv24, do you mind sharing repro steps? I just tried the following and it worked fine.

  1. Create a new venv:
python3 -m venv venv
source venv/bin/activate
  1. Install pipecat:
pip install pipecat-ai
  1. Create an .env file containing Deepgram, OpenAI, and Daily keys:
touch .env
  1. Install pipecat extras for Daily, OpenAI, Deepgram, and Silero:
pip install "pipecat-ai[daily,openai,silero,deepgram]"
  1. Install Pipecat Flows:
pip install pipecat-ai-flows
  1. Created and installed dev-requirements.txt from Pipecat (link):
touch dev-requirements.txt
pip install -r dev-requirements.txt
  1. Installed python-dotenv (This should be in the dev-requirements for Pipecat. I'll add that in a PR):
pip install python-dotenv
  1. Ran this foundational example: https://github.com/pipecat-ai/pipecat/blob/main/examples/foundational/07c-interruptible-deepgram.py.
touch test.py

Pasted contents from 07c

python test.py

This ran as expected without needing Anthropic.

Can you share your steps?

@gururise
Copy link

Same issue here.

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/gene/Downloads/pipecat/examples/simple-chatbot/server/bot-gemini.py", line 55, in <module>
    from pipecat_flows import FlowArgs, FlowConfig, FlowManager, FlowResult
  File "/home/gene/Downloads/pipecat/.venv/lib/python3.12/site-packages/pipecat_flows/__init__.py", line 66, in <module>
    from .manager import FlowManager
  File "/home/gene/Downloads/pipecat/.venv/lib/python3.12/site-packages/pipecat_flows/manager.py", line 38, in <module>
    from pipecat.services.anthropic import AnthropicLLMService
  File "/home/gene/Downloads/pipecat/.venv/lib/python3.12/site-packages/pipecat/services/anthropic.py", line 55, in <module>
    raise Exception(f"Missing module: {e}")
Exception: Missing module: No module named 'anthropic'

@Atharv24
Copy link
Author

@markbackman i was using pipecat-ai in my existing project, then added pipecat-ai-flows without any optional dependencies (as they were included in pipecat-ai dependencies)
Then i got the missing module error for Anthropic.

@markbackman
Copy link
Contributor

Thanks @Atharv24. That makes sense. I'll fix this. Working on it here: #69.

@markbackman markbackman added the bug Something isn't working label Dec 20, 2024
@markbackman
Copy link
Contributor

Closing this issue as #69 has been merged. This will be included in the next Flows release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants