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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

GoogleVertexChatExperiment.ipynb notebook does not work #105

Open
v opened this issue Nov 22, 2023 · 1 comment
Open

GoogleVertexChatExperiment.ipynb notebook does not work #105

v opened this issue Nov 22, 2023 · 1 comment

Comments

@v
Copy link

v commented Nov 22, 2023

馃悰 Describe the bug

I downloaded the notebook GoogleVertexChatExperiment.ipynb and tried to run it and I get this error:

----> 1 from prompttools.experiment import GoogleVertexChatCompletionExperiment
      4 model = ["chat-bison"]
      6 context = ["You are a helpful assistant.",
      7            "Answer the following question only if you know the answer or can make a well-informed guess; otherwise tell me you don't know it. In addition, explain your reasoning of your final answer."]

File ~/.pyenv/versions/3.11.5/envs/onc/lib/python3.11/site-packages/prompttools/__init__.py:7
      1 # Copyright (c) Hegel AI, Inc.
      2 # All rights reserved.
      3 #
      4 # This source code's license can be found in the
      5 # LICENSE file in the root directory of this source tree.
----> 7 from .prompttest import prompttest
      8 from .sentry import init_sentry
     11 init_sentry()

File ~/.pyenv/versions/3.11.5/envs/onc/lib/python3.11/site-packages/prompttools/prompttest/prompttest.py:13
     11 from .threshold_type import ThresholdType
     12 from .error.failure import PromptTestSetupException
---> 13 from .runner.runner import run_prompttest
     15 TESTS_TO_RUN = []
     18 def prompttest(
     19     metric_name: str,
...
     42         ),
     43         before_sleep=before_sleep_log(logging.getLogger(__name__), logging.WARNING),
     44     )

AttributeError: module 'openai' has no attribute 'APIConnectionError'

Not sure why GoogleVertexChatExperiment is depending on openai

The relevant packages I have installed locally are:

openai==1.3.4
prompttools==0.0.43

Running on Mac OSX in 3.11.5

@steventkrawczyk
Copy link
Contributor

Can you try again with a clean virtual environment and list all the packages you are installing?

I am seeing OpenAI errors related to other installations, like langchain, e.g. https://community.openai.com/t/attributeerror-module-openai-has-no-attribute-error/486676

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants