[Feature] Add support for OpenAI assistants and support openai version >=1.0.0 (#921)

This commit is contained in:
Deshraj Yadav
2023-11-08 22:49:03 -08:00
committed by GitHub
parent d8cdbe0041
commit f7dd65a3de
28 changed files with 621 additions and 247 deletions

View File

@@ -33,12 +33,14 @@ def cleanup_db():
print("Error: %s - %s." % (e.filename, e.strerror))
@pytest.mark.skip(reason="ChromaDB client needs to be mocked")
def test_chroma_db_init_with_host_and_port(chroma_db):
settings = chroma_db.client.get_settings()
assert settings.chroma_server_host == "test-host"
assert settings.chroma_server_http_port == "1234"
@pytest.mark.skip(reason="ChromaDB client needs to be mocked")
def test_chroma_db_init_with_basic_auth():
chroma_config = {
"host": "test-host",
@@ -159,6 +161,8 @@ def test_chroma_db_collection_add_with_skip_embedding(app_with_settings):
"embeddings": None,
"ids": ["id"],
"metadatas": [{"url": "url_1", "doc_id": "doc_id_1"}],
"data": None,
"uris": None,
}
assert data == expected_value