Skip to content

requirements.txt pins pre-1.0 openai + langchain 0.0.89; ChatCompletion API removed #14

Description

@chirag127

Problem

requirements.txt pins openai~=0.27.4 and langchain~=0.0.89. scenarios/common/chat_app.py uses the pre-1.0 openai.ChatCompletion.create(...) API, which was removed in openai>=1.0.0 (Nov 2023).

Steps

  1. git clone https://github.com/greshake/llm-security && cd llm-security
  2. python -m venv .venv && . .venv/bin/activate (Python 3.12)
  3. pip install -r requirements.txt
  4. python main.py and pick any GPT-4 scenario

Expected

Scenarios run.

Actual

  • Pip resolves openai 0.27.x (unmaintained). If a user upgrades or a transitive bump lands, openai.ChatCompletion.create raises APIRemovedInV1 at scenarios/common/chat_app.py:62.
  • langchain~=0.0.89 fails to install cleanly on Python 3.12+ (dropped support for old pydantic v1 pins).

Env

requirements.txt L1: langchain~=0.0.89. L3: openai~=0.27.4. Chat call: scenarios/common/chat_app.py:62.

Thanks for maintaining greshake/llm-security!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions