Skip to content

Commit

Permalink
Fixing python tests with previous preprocess modes on merge
Browse files Browse the repository at this point in the history
  • Loading branch information
deven96 committed Nov 26, 2024
1 parent e8b65a9 commit 4f7d123
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 9 deletions.
4 changes: 1 addition & 3 deletions examples/python/book-search/insert_book.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ async def set_client(ai_client, inputs):
response = await ai_client.set(
store_name=ai_store_payload_with_predicates["store_name"],
inputs=inputs,
preprocess_action=ai_query.PreprocessAction__RawString(
ai_query.StringAction__ErrorIfTokensExceed()
),
preprocess_action=ai_query.PreprocessAction__NoPreprocessing(),
)

print(response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class AsyncAhnlichAIRequestBuilder(AhnlichAIRequestBuilder):

def __init__(self, tracing_id: str = None, client: BaseClient = None) -> None:
self.queries: typing.List[ai_query.AIQuery] = []
self.tracing_id = tracing_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class AsyncAhnlichDBRequestBuilder(AhnlichDBRequestBuilder):

def __init__(self, tracing_id: str = None, client: BaseClient = None) -> None:
self.queries: typing.List[db_query.Query] = []
self.tracing_id = tracing_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,7 @@ async def test_ai_client_get_pred(spin_up_ahnlich_ai):
builder.set(
store_name=ai_store_payload_with_predicates["store_name"],
inputs=store_inputs,
preprocess_action=ai_query.PreprocessAction__RawString(
ai_query.StringAction__ErrorIfTokensExceed()
),
preprocess_action=ai_query.PreprocessAction__NoPreprocessing(),
)
expected = ai_response.AIServerResult(
results=[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ async def test_client_sends_ping_to_db_success(module_scopped_ahnlich_db):
port = module_scopped_ahnlich_db
db_client = non_blocking.AhnlichDBClient(address="127.0.0.1", port=port)
try:

response: db_response.ServerResult = await db_client.ping()
assert len(response.results) == 1
assert response.results[0] == db_response.Result__Ok(
Expand Down

0 comments on commit 4f7d123

Please sign in to comment.