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

AttributeError: module 'openai' has no attribute 'types' #122

Open
PPadgett opened this issue Feb 13, 2024 · 0 comments
Open

AttributeError: module 'openai' has no attribute 'types' #122

PPadgett opened this issue Feb 13, 2024 · 0 comments

Comments

@PPadgett
Copy link

馃悰 Describe the bug

PS C:\LocalDevPipeline> git clone https://github.com/hegelai/prompttools.git
Cloning into 'prompttools'...
remote: Enumerating objects: 5354, done.
remote: Counting objects: 100% (2148/2148), done.
remote: Compressing objects: 100% (628/628), done.
remote: Total 5354 (delta 1663), reused 1756 (delta 1509), pack-reused 3206
Receiving objects: 100% (5354/5354), 32.83 MiB | 6.39 MiB/s, done.
Resolving deltas: 100% (3428/3428), done.
Updating files: 100% (193/193), done.
PS C:\LocalDevPipeline> cd .\prompttools
PS C:\LocalDevPipeline\prompttools> streamlit.exe run prompttools/playground/playground.py

You can now view your Streamlit app in your browser.

Local URL: http://localhost:8501
Network URL: http://10.0.0.6:8501

2024-02-13 13:21:09.120 Uncaught app exception
Traceback (most recent call last):
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 535, in run_script
exec(code, module.dict)
File "C:\LocalDevPipeline\prompttools\prompttools\playground\playground.py", line 25, in
from prompttools.playground.constants import MODES, MODEL_TYPES, OPENAI_CHAT_MODELS, OPENAI_COMPLETION_MODELS
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools_init
.py", line 7, in
from .prompttest import prompttest
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools\prompttest\prompttest.py", line 13, in
from .runner.runner import run_prompttest
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools\prompttest\runner\runner.py", line 13, in
from prompttools.experiment import Experiment
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools\experiment_init_.py", line 9, in
from .experiments.openai_chat_experiment import OpenAIChatExperiment
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools\experiment\experiments\openai_chat_experiment.py", line 24, in
class OpenAIChatExperiment(Experiment):
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools\experiment\experiments\openai_chat_experiment.py", line 177, in OpenAIChatExperiment
def extract_responses(output: openai.types.Completion) -> str:
AttributeError: module 'openai' has no attribute 'types'
2024-02-13 13:21:15.920 Uncaught app exception
Traceback (most recent call last):
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 535, in run_script
exec(code, module.dict)
File "C:\LocalDevPipeline\prompttools\prompttools\playground\playground.py", line 25, in
from prompttools.playground.constants import MODES, MODEL_TYPES, OPENAI_CHAT_MODELS, OPENAI_COMPLETION_MODELS
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools_init
.py", line 7, in
from .prompttest import prompttest
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools\prompttest\prompttest.py", line 13, in
from .runner.runner import run_prompttest
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools\prompttest\runner\runner.py", line 13, in
from prompttools.experiment import Experiment
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools\experiment_init
.py", line 9, in
from .experiments.openai_chat_experiment import OpenAIChatExperiment
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools\experiment\experiments\openai_chat_experiment.py", line 24, in
class OpenAIChatExperiment(Experiment):
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools\experiment\experiments\openai_chat_experiment.py", line 177, in OpenAIChatExperiment
def extract_responses(output: openai.types.Completion) -> str:
AttributeError: module 'openai' has no attribute 'types'
2024-02-13 13:21:22.891 Uncaught app exception
Traceback (most recent call last):
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 535, in run_script
exec(code, module.dict)
File "C:\LocalDevPipeline\prompttools\prompttools\playground\playground.py", line 25, in
from prompttools.playground.constants import MODES, MODEL_TYPES, OPENAI_CHAT_MODELS, OPENAI_COMPLETION_MODELS
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools_init
.py", line 7, in
from .prompttest import prompttest
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools\prompttest\prompttest.py", line 13, in
from .runner.runner import run_prompttest
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools\prompttest\runner\runner.py", line 13, in
from prompttools.experiment import Experiment
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools\experiment_init
.py", line 9, in
from .experiments.openai_chat_experiment import OpenAIChatExperiment
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools\experiment\experiments\openai_chat_experiment.py", line 24, in
class OpenAIChatExperiment(Experiment):
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools\experiment\experiments\openai_chat_experiment.py", line 177, in OpenAIChatExperiment
def extract_responses(output: openai.types.Completion) -> str:
AttributeError: module 'openai' has no attribute 'types'
2024-02-13 13:21:23.898 Uncaught app exception
Traceback (most recent call last):
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 535, in run_script
exec(code, module.dict)
File "C:\LocalDevPipeline\prompttools\prompttools\playground\playground.py", line 25, in
from prompttools.playground.constants import MODES, MODEL_TYPES, OPENAI_CHAT_MODELS, OPENAI_COMPLETION_MODELS
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools_init
.py", line 7, in
from .prompttest import prompttest
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools\prompttest\prompttest.py", line 13, in
from .runner.runner import run_prompttest
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools\prompttest\runner\runner.py", line 13, in
from prompttools.experiment import Experiment
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools\experiment_init
.py", line 9, in
from .experiments.openai_chat_experiment import OpenAIChatExperiment
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools\experiment\experiments\openai_chat_experiment.py", line 24, in
class OpenAIChatExperiment(Experiment):
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools\experiment\experiments\openai_chat_experiment.py", line 177, in OpenAIChatExperiment
def extract_responses(output: openai.types.Completion) -> str:
AttributeError: module 'openai' has no attribute 'types'
2024-02-13 13:21:24.001 Uncaught app exception
Traceback (most recent call last):
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 535, in run_script
exec(code, module.dict)
File "C:\LocalDevPipeline\prompttools\prompttools\playground\playground.py", line 25, in
from prompttools.playground.constants import MODES, MODEL_TYPES, OPENAI_CHAT_MODELS, OPENAI_COMPLETION_MODELS
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools_init
.py", line 7, in
from .prompttest import prompttest
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools\prompttest\prompttest.py", line 13, in
from .runner.runner import run_prompttest
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools\prompttest\runner\runner.py", line 13, in
from prompttools.experiment import Experiment
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools\experiment_init
.py", line 9, in
from .experiments.openai_chat_experiment import OpenAIChatExperiment
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools\experiment\experiments\openai_chat_experiment.py", line 24, in
class OpenAIChatExperiment(Experiment):
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools\experiment\experiments\openai_chat_experiment.py", line 177, in OpenAIChatExperiment
def extract_responses(output: openai.types.Completion) -> str:
AttributeError: module 'openai' has no attribute 'types'
2024-02-13 13:21:25.893 Uncaught app exception
Traceback (most recent call last):
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 535, in run_script
exec(code, module.dict)
File "C:\LocalDevPipeline\prompttools\prompttools\playground\playground.py", line 25, in
from prompttools.playground.constants import MODES, MODEL_TYPES, OPENAI_CHAT_MODELS, OPENAI_COMPLETION_MODELS
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools_init
.py", line 7, in
from .prompttest import prompttest
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools\prompttest\prompttest.py", line 13, in
from .runner.runner import run_prompttest
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools\prompttest\runner\runner.py", line 13, in
from prompttools.experiment import Experiment
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools\experiment_init
.py", line 9, in
from .experiments.openai_chat_experiment import OpenAIChatExperiment
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools\experiment\experiments\openai_chat_experiment.py", line 24, in
class OpenAIChatExperiment(Experiment):
File "C:\Users\AllNi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompttools\experiment\experiments\openai_chat_experiment.py", line 177, in OpenAIChatExperiment
def _extract_responses(output: openai.types.Completion) -> str:
AttributeError: module 'openai' has no attribute 'types'

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

1 participant