We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I was running through notebooks/QueryOpenAI.ipynb and I get the following error during from prompt_lib.backends import openai_api:
from prompt_lib.backends import openai_api
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) [/Users/drnic/workspace/aiagents/self-refine/prompt-lib/notebooks/QueryOpenAI.ipynb](https://file+.vscode-resource.vscode-cdn.net/Users/drnic/workspace/aiagents/self-refine/prompt-lib/notebooks/QueryOpenAI.ipynb) Cell 5 line 1 ----> [1](vscode-notebook-cell:/Users/drnic/workspace/aiagents/self-refine/prompt-lib/notebooks/QueryOpenAI.ipynb#W4sZmlsZQ%3D%3D?line=0) from prompt_lib.backends import openai_api File [~/workspace/aiagents/self-refine/prompt-lib/prompt_lib/backends/openai_api.py:11](https://file+.vscode-resource.vscode-cdn.net/Users/drnic/workspace/aiagents/self-refine/prompt-lib/notebooks/~/workspace/aiagents/self-refine/prompt-lib/prompt_lib/backends/openai_api.py:11) [9](https://file+.vscode-resource.vscode-cdn.net/Users/drnic/workspace/aiagents/self-refine/prompt-lib/notebooks/~/workspace/aiagents/self-refine/prompt-lib/prompt_lib/backends/openai_api.py:9) from prompt_lib.backends.wrapper import BaseAPIWrapper [10](https://file+.vscode-resource.vscode-cdn.net/Users/drnic/workspace/aiagents/self-refine/prompt-lib/notebooks/~/workspace/aiagents/self-refine/prompt-lib/prompt_lib/backends/openai_api.py:10) from prompt_lib.backends.self_hosted import OpenSourceAPIWrapper ---> [11](https://file+.vscode-resource.vscode-cdn.net/Users/drnic/workspace/aiagents/self-refine/prompt-lib/notebooks/~/workspace/aiagents/self-refine/prompt-lib/prompt_lib/backends/openai_api.py:11) from prompt_lib.backends.anthropic_api import AnthropicAPIWrapper [13](https://file+.vscode-resource.vscode-cdn.net/Users/drnic/workspace/aiagents/self-refine/prompt-lib/notebooks/~/workspace/aiagents/self-refine/prompt-lib/prompt_lib/backends/openai_api.py:13) openai.api_key = os.getenv("OPENAI_API_KEY") [15](https://file+.vscode-resource.vscode-cdn.net/Users/drnic/workspace/aiagents/self-refine/prompt-lib/notebooks/~/workspace/aiagents/self-refine/prompt-lib/prompt_lib/backends/openai_api.py:15) # check if orgainization is set File [~/workspace/aiagents/self-refine/prompt-lib/prompt_lib/backends/anthropic_api.py:11](https://file+.vscode-resource.vscode-cdn.net/Users/drnic/workspace/aiagents/self-refine/prompt-lib/notebooks/~/workspace/aiagents/self-refine/prompt-lib/prompt_lib/backends/anthropic_api.py:11) [8](https://file+.vscode-resource.vscode-cdn.net/Users/drnic/workspace/aiagents/self-refine/prompt-lib/notebooks/~/workspace/aiagents/self-refine/prompt-lib/prompt_lib/backends/anthropic_api.py:8) from prompt_lib.backends.wrapper import BaseAPIWrapper [10](https://file+.vscode-resource.vscode-cdn.net/Users/drnic/workspace/aiagents/self-refine/prompt-lib/notebooks/~/workspace/aiagents/self-refine/prompt-lib/prompt_lib/backends/anthropic_api.py:10) ANTHROPIC_API_KEY = os.environ.get("ANTHROPIC_API_KEY", "Your_Default_Value") ---> [11](https://file+.vscode-resource.vscode-cdn.net/Users/drnic/workspace/aiagents/self-refine/prompt-lib/notebooks/~/workspace/aiagents/self-refine/prompt-lib/prompt_lib/backends/anthropic_api.py:11) client = anthropic.Client(ANTHROPIC_API_KEY) [14](https://file+.vscode-resource.vscode-cdn.net/Users/drnic/workspace/aiagents/self-refine/prompt-lib/notebooks/~/workspace/aiagents/self-refine/prompt-lib/prompt_lib/backends/anthropic_api.py:14) class AnthropicAPIWrapper(BaseAPIWrapper): [15](https://file+.vscode-resource.vscode-cdn.net/Users/drnic/workspace/aiagents/self-refine/prompt-lib/notebooks/~/workspace/aiagents/self-refine/prompt-lib/prompt_lib/backends/anthropic_api.py:15) @staticmethod [16](https://file+.vscode-resource.vscode-cdn.net/Users/drnic/workspace/aiagents/self-refine/prompt-lib/notebooks/~/workspace/aiagents/self-refine/prompt-lib/prompt_lib/backends/anthropic_api.py:16) def _call_api( [17](https://file+.vscode-resource.vscode-cdn.net/Users/drnic/workspace/aiagents/self-refine/prompt-lib/notebooks/~/workspace/aiagents/self-refine/prompt-lib/prompt_lib/backends/anthropic_api.py:17) prompt: str, ref='~/workspace/aiagents/self-refine/prompt-lib/prompt_lib/backends/anthropic_api.py:0'>0</a>;32m (...) [22](https://file+.vscode-resource.vscode-cdn.net/Users/drnic/workspace/aiagents/self-refine/prompt-lib/notebooks/~/workspace/aiagents/self-refine/prompt-lib/prompt_lib/backends/anthropic_api.py:22) num_completions: int = 1, [23](https://file+.vscode-resource.vscode-cdn.net/Users/drnic/workspace/aiagents/self-refine/prompt-lib/notebooks/~/workspace/aiagents/self-refine/prompt-lib/prompt_lib/backends/anthropic_api.py:23) ) -> dict: TypeError: Anthropic.__init__() takes 1 positional argument but 2 were given
The text was updated successfully, but these errors were encountered:
Hardcode valid version of anthropic; v0.3.8+ causes error [fixes reas…
757eb71
…oning-machines#10]
No branches or pull requests
I was running through notebooks/QueryOpenAI.ipynb and I get the following error during
from prompt_lib.backends import openai_api
:The text was updated successfully, but these errors were encountered: