jxmorris12 / vec2text

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

openai api key cannot pass to vec2text package #15

Closed dbdx-zwh closed 9 months ago

dbdx-zwh commented 9 months ago

hello, i just try your vec2text_demo(ipynb file), and change the openai api key to my own key and i test it with a simple chat, it works. However, when i run "import vec2text", it fails and said "OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable"

dbdx-zwh commented 9 months ago

ok i solve it, i explicitly insert my api key to "vec2text/trainers_baseline/fewshot_inversion_trainer.py" file and it works, sorry for bothering, btw nice paper and nice work!