Skip to content

check if the openai version is above 1.0, it could be now 2.x  #5727

@ZahraBoroujeni

Description

@ZahraBoroujeni

In previous version of chromadb it checks the version of openai if it is 1.x , it should check if it is bigger than 1.x (now openai version is 2.6)

self._v1 = openai.__version__.startswith("1.")

self._v1 = openai.__version__.startswith("1.")

    self._v1 = openai.__version__.startswith("1.")

should be change to

  from packaging import version  
  self._v1 = version.parse(openai.__version__) >= version.parse("1.0.0")

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