Erol444 / gpt4-openai-api

Python package that provides (unofficial) API access to the GPT-4 through chat.openai.com. Works with langchain. Supports browsing, DALL-E 3, plugins, continuing generation.
165 stars 38 forks source link

Needs update after open ai has changed the model selector front-end #5

Closed abderrahmanskiredj closed 1 year ago

abderrahmanskiredj commented 1 year ago

OpenAI has just changed its chatgpt interface. Specifically, there is no more a dropdown list of models to choose from. Therefore, a change in driver file is needed. Thanks a lot

abderrahmanskiredj commented 1 year ago

In the driver.py file just write this at the line 455:

self.logger.debug('Trying to select model...') gpt4_button_selector = (By.XPATH, "//button[.//span[contains(text(), 'GPT-4')]]")

WebDriverWait(self.driver, 3).until( EC.presence_of_element_located(gpt4_button_selector) ).click()

self.logger.debug('GPT4 model selected')

Erol444 commented 1 year ago

@abderrahmanskiredj added support on the new release, which just specifies the model in url (and doesn't click stuff). It also supports browsing/plugins.