Skip to content

Commit 9749bf2

Browse files
Dan JonesDan Jones
authored andcommitted
Lint
1 parent 498a659 commit 9749bf2

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

src/query/agent.test.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
import { WeaviateClient } from "weaviate-client";
22
import { QueryAgent } from "./agent.js";
33
import { ApiQueryAgentResponse } from "./response/api-response.js";
4-
import {
5-
QueryAgentResponse,
6-
ComparisonOperator,
7-
} from "./response/response.js";
4+
import { QueryAgentResponse, ComparisonOperator } from "./response/response.js";
85
import { ApiSearchModeResponse } from "./response/api-response.js";
96
import { QueryAgentError } from "./response/error.js";
107

@@ -176,9 +173,12 @@ it("search-only mode success: caches searches and sends on subsequent request",
176173
} as Response);
177174
}) as jest.Mock;
178175

179-
const agent = new QueryAgent(mockClient)
176+
const agent = new QueryAgent(mockClient);
180177

181-
const first = await agent.search("test query", { limit: 2, collections: ["test_collection"] });
178+
const first = await agent.search("test query", {
179+
limit: 2,
180+
collections: ["test_collection"],
181+
});
182182
expect(first).toMatchObject({
183183
originalQuery: apiSuccess.original_query,
184184
searches: [
@@ -254,7 +254,10 @@ it("search-only mode failure propagates QueryAgentError", async () => {
254254

255255
const agent = new QueryAgent(mockClient);
256256
try {
257-
await agent.search("test query", { limit: 2, collections: ["test_collection"] });
257+
await agent.search("test query", {
258+
limit: 2,
259+
collections: ["test_collection"],
260+
});
258261
} catch (err) {
259262
expect(err).toBeInstanceOf(QueryAgentError);
260263
expect(err).toMatchObject({

src/query/agent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ export class QueryAgent {
203203
collections: collections ?? this.collections,
204204
systemPrompt: this.systemPrompt,
205205
agentsHost: this.agentsHost,
206-
})
206+
});
207207
return searcher.run({ limit: limit ?? 20, offset: 0 });
208208
}
209209
}

src/query/response/response.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,5 +272,8 @@ export type MappedSearchModeResponse<T> = {
272272
};
273273

274274
export type SearchModeResponse<T> = MappedSearchModeResponse<T> & {
275-
next: (options?: { limit?: number; offset?: number }) => Promise<SearchModeResponse<T>>;
275+
next: (options?: {
276+
limit?: number;
277+
offset?: number;
278+
}) => Promise<SearchModeResponse<T>>;
276279
};

0 commit comments

Comments
 (0)