michaeloo0 / chatgpt-doc-translator

This is a web service built using FastAPI and OpenAI's GPT-3.5-Turbo model that enables translation of various types of documents. The service currently supports translation of PDF, Word, CSV, TXT, and PPTX files.
126 stars 29 forks source link

Api key won't parse correctly #6

Closed dannythunder closed 12 months ago

dannythunder commented 1 year ago

There is a bug in interact_llm.py where the api key is parsed openai.api_key = os.environ['OPENAI_API_KEY'].

I've no experience in python lang, but looking at temperature=float(os.environ['TEMPERATURE']) seeing the [' '] i suspect it's not being parsed as a string.

I changed to [" "] and it worked.

Creating a pull request with some minor changes to the readme.

michaeloo0 commented 12 months ago

Thanks!