Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgraded OpenAI SDK Version #65

Merged
merged 3 commits into from
Nov 29, 2024
Merged

Upgraded OpenAI SDK Version #65

merged 3 commits into from
Nov 29, 2024

Conversation

MinuraPunchihewa
Copy link
Contributor

This PR updates the OpenAI SDK version to avoid the issue describe in the issue below.

As per the thread given here, upgrading to the pinned version resolves the issue given above.

Using this new version, I am able to use the SDK without a problem:
image

Fixes #64

@ZoranPandovski
Copy link
Member

@MinuraPunchihewa, @ea-rus What if we make the OpenAI SDK as optional dependency in extras ? By default it will be not installed to avoid issues as the above. If users wants to use the chat competition they they install as pip install mindsdb-sdl[openai]

@MinuraPunchihewa
Copy link
Contributor Author

@MinuraPunchihewa, @ea-rus What if we make the OpenAI SDK as optional dependency in extras ? By default it will be not installed to avoid issues as the above. If users wants to use the chat competition they they install as pip install mindsdb-sdl[openai]

@ZoranPandovski Is that possible? I think that every operation that we are running via the SDK requires the OpenAI SDK, right? Since it interacts with our API?

@MinuraPunchihewa
Copy link
Contributor Author

@ea-rus I think some of the tests were broken, but please check if my changes are correct.

@@ -443,3 +444,8 @@ def openai_completion_f(messages, *args, **kwargs):
if question == chunk.content.lower():
success = True
assert success is True


if __name__ == '__main__':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is extra
tests should be run using pytest command


expected_create_request = {
'name': test_knowledge_base_config.name,
'description': test_knowledge_base_config.description,
'vector_store': {
'engine': test_vector_store_config.engine,
'connection_data': test_vector_store_config.connection_data
'connection_data': test_vector_store_config.connection_data,
'table': test_vector_store_config.table
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ea-rus ea-rus merged commit e5a5737 into main Nov 29, 2024
5 checks passed
@mindsdb mindsdb locked and limited conversation to collaborators Nov 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeError: Client.__init__() got an unexpected keyword argument 'proxies'
3 participants