Skip to content

Commit e5a5737

Browse files
authored
Merge pull request #65 from mindsdb/bugfix/fix_openai_version
Upgraded OpenAI SDK Version
2 parents a9b63c7 + 7da0f90 commit e5a5737

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
pydantic==2.8.2
22
requests
3-
openai == 1.24.0
3+
openai == 1.55.3

tests/unit/test_unit.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def check_ds_created(ds, mock_post, url):
5353
self._compare_ds(ds, example_ds)
5454
args, kwargs = mock_post.call_args
5555

56-
assert kwargs['headers'] == {'Authorization': 'Bearer ' + API_KEY}
56+
assert kwargs['headers'] == {'Authorization': 'Bearer ' + API_KEY, 'Content-Type': 'application/json'}
5757
assert kwargs['json'] == example_ds.model_dump()
5858
assert args[0] == url
5959

@@ -142,14 +142,15 @@ def test_create_knowledge_bases(self, mock_post, mock_get):
142142

143143
args, kwargs = mock_post.call_args
144144

145-
assert kwargs['headers'] == {'Authorization': 'Bearer ' + API_KEY}
145+
assert kwargs['headers'] == {'Authorization': 'Bearer ' + API_KEY, 'Content-Type': 'application/json'}
146146

147147
expected_create_request = {
148148
'name': test_knowledge_base_config.name,
149149
'description': test_knowledge_base_config.description,
150150
'vector_store': {
151151
'engine': test_vector_store_config.engine,
152-
'connection_data': test_vector_store_config.connection_data
152+
'connection_data': test_vector_store_config.connection_data,
153+
'table': test_vector_store_config.table
153154
},
154155
'embedding_model': {
155156
'provider': test_embedding_config.provider,

0 commit comments

Comments
 (0)