Skip to content

Commit

Permalink
Refactor: Fixing Tests that currently were not passing even though Op…
Browse files Browse the repository at this point in the history
…enAI API key was passed

- Implement abstractmethod in dae_evaluator and refactor to new OpenAI API
- Refactor dimension function in duckdb_adapter
- test refactoring: clinwar wrapper, dae evaluator, splitter
- Fix issues with readonly database and linting
  • Loading branch information
iQuxLE committed Sep 11, 2024
1 parent 7a40304 commit a245bf7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/curate_gpt/extract/openai_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def extract(
logger.debug(f"RESPONSE = {response}")
# print(response)
choice = response.choices[0]
message = choice["message"]
message = choice.message
if "function_call" not in message:
if self.raise_error_if_unparsable:
raise ValueError("No function call in response")
Expand Down
1 change: 1 addition & 0 deletions tests/store/test_duckdb_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ def test_the_embedding_function_variations(
expected_name = "test_collection"
else:
# Specific case: Collection specified, model may or may not be specified
print("\n\n",model,"\n\n")
db.insert(objs, collection=collection, model=model)
expected_model = model if model else "all-MiniLM-L6-v2"
expected_name = collection
Expand Down

0 comments on commit a245bf7

Please sign in to comment.