Skip to content

Commit

Permalink
Update JS (#941)
Browse files Browse the repository at this point in the history
  • Loading branch information
NolanTrem authored Aug 22, 2024
1 parent a75705f commit 18e8f2e
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 13 deletions.
1 change: 0 additions & 1 deletion js/sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ const ingestResult = await client.ingestFiles(files, {
"123e4567-e89b-12d3-a456-426614174000",
"123e4567-e89b-12d3-a456-426614174000",
],
skip_document_info: false,
});
console.log(ingestResult);
```
Expand Down
1 change: 0 additions & 1 deletion js/sdk/__tests__/r2rClientIntegrationSuperUser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ describe("r2rClient Integration Tests", () => {
await expect(
client.ingestFiles(files, {
metadatas: [{ title: "raskolnikov.txt" }, { title: "karamozov.txt" }],
skip_document_info: false,
}),
).resolves.not.toThrow();
});
Expand Down
1 change: 0 additions & 1 deletion js/sdk/__tests__/r2rClientIntegrationUser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ describe("r2rClient Integration Tests", () => {
await expect(
client.ingestFiles(files, {
metadatas: [{ title: "raskolnikov.txt" }],
skip_document_info: false,
}),
).resolves.not.toThrow();
});
Expand Down
1 change: 0 additions & 1 deletion js/sdk/examples/hello_r2r.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ async function main() {
console.log("Ingesting file...");
const ingestResult = await client.ingestFiles(files, {
metadatas: [{ title: "raskolnikov.txt" }],
skip_document_info: false,
});
console.log("Ingest result:", JSON.stringify(ingestResult, null, 2));

Expand Down
9 changes: 8 additions & 1 deletion js/sdk/src/models.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,16 @@ export interface GenerationConfig {

export interface VectorSearchSettings {
use_vector_search?: boolean;
use_hybrid_search?: boolean;
filters?: Record<string, any>;
search_limit?: number;
use_hybrid_search?: boolean;
selected_group_ids?: string[];
// TODO: add index measure
// TODO: add include vars
// TODO: add include metadatas
// TODO: add include probes
// TODO: add ef_search
// TODO: add hybrid_search_settings
}

export interface KGSearchSettings {
Expand Down
7 changes: 0 additions & 7 deletions js/sdk/src/r2rClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,7 @@ export class r2rClient {
metadatas?: Record<string, any>[];
document_ids?: string[];
user_ids?: (string | null)[];
versions?: string[];
chunking_settings?: Record<string, any>;
skip_document_info?: boolean;
} = {},
): Promise<any> {
this._ensureAuthenticated();
Expand Down Expand Up @@ -472,14 +470,9 @@ export class r2rClient {
? JSON.stringify(options.document_ids)
: undefined,
user_ids: options.user_ids ? JSON.stringify(options.user_ids) : undefined,
versions: options.versions ? JSON.stringify(options.versions) : undefined,
chunking_settings: options.chunking_settings
? JSON.stringify(options.chunking_settings)
: undefined,
skip_document_info:
options.skip_document_info !== undefined
? JSON.stringify(options.skip_document_info)
: undefined,
};

Object.entries(data).forEach(([key, value]) => {
Expand Down
1 change: 0 additions & 1 deletion py/cli/commands/management.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
# TODO: Implement update_prompt


# TODO: Update
@cli.command()
@click.option("--filters", type=JSON, help="Filters for analytics as JSON")
@click.option("--analysis-types", type=JSON, help="Analysis types as JSON")
Expand Down

0 comments on commit 18e8f2e

Please sign in to comment.