jxmorris12 / vec2text

utilities for decoding deep representations (like sentence embeddings) back to text
Other
673 stars 75 forks source link

Migrate to openai-v1.x.x API #12

Closed lbertge closed 9 months ago

lbertge commented 9 months ago

Hello,

I was getting an error about the embedding function being deprecated. Since the openai package is not locked to a version, I thought it might be worth migrating vec2text to the new v1.x.x API as well.

steps

  1. I'm following this guide: https://github.com/openai/openai-python/discussions/742

    pip install --upgrade openai 
    openai migrate
  2. Run pre-commit checks

    pip install isort black flake8 mypy --upgrade
    pre-commit run --all

    There are some failing checks, but I ignored them since they aren't pertinent to the migration changes (I hope that's ok).

Thank you for you consideration!

jxmorris12 commented 9 months ago

awesome – thanks! I was planning on doing this today. Thankful for you 🦃