Skip to content

openai import issue #2

@Panchajanya1999

Description

@Panchajanya1999

Installed requiremnts.txt

getting this.

Traceback (most recent call last):
  File "/home/panchajanya/Development/work/Assistant/test.py", line 1, in <module>
    from assistant import AIAssistant
  File "/home/panchajanya/Development/work/Assistant/assistant.py", line 2, in <module>
    from openai import OpenAI
ImportError: cannot import name 'OpenAI' from 'openai' (/home/panchajanya/Development/work/Assistant/lib/python3.11/site-packages/openai/__init__.py)

I just created a custom retrieval chat function

from assistant import AIAssistant

assistant = AIAssistant(
    instruction=""" You are a helpful agent that helps user with their question about LLMs.""",
    model="gpt-4-1106-preview",
    use_retrieval=True,
    )
file_id = assistant.upload_file("assistants_files/Mankind_v1.1.csv")
assistant.chat(file_ids=[file_id])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions