diff --git a/.stats.yml b/.stats.yml index 785904d..40f1ba4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 22 +configured_endpoints: 21 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/writerai%2Fwriter-82683f2fd5f8778a27960ebabda40d6dc4640bdfb77ac4ec7f173b8bf8076d3c.yml diff --git a/api.md b/api.md index ff95e5e..65561ed 100644 --- a/api.md +++ b/api.md @@ -86,13 +86,11 @@ Types: - ToolContextAwareSplittingResponse - ToolParsePdfResponse -- ToolTextToGraphResponse Methods: - client.tools.contextAwareSplitting({ ...params }) -> ToolContextAwareSplittingResponse - client.tools.parsePdf(fileId, { ...params }) -> ToolParsePdfResponse -- client.tools.textToGraph({ ...params }) -> ToolTextToGraphResponse ## Comprehend diff --git a/src/index.ts b/src/index.ts index cfe0d3d..b0b0cdf 100644 --- a/src/index.ts +++ b/src/index.ts @@ -62,8 +62,6 @@ import { ToolContextAwareSplittingResponse, ToolParsePdfParams, ToolParsePdfResponse, - ToolTextToGraphParams, - ToolTextToGraphResponse, Tools, } from './resources/tools/tools'; @@ -299,10 +297,8 @@ export declare namespace Writer { Tools as Tools, type ToolContextAwareSplittingResponse as ToolContextAwareSplittingResponse, type ToolParsePdfResponse as ToolParsePdfResponse, - type ToolTextToGraphResponse as ToolTextToGraphResponse, type ToolContextAwareSplittingParams as ToolContextAwareSplittingParams, type ToolParsePdfParams as ToolParsePdfParams, - type ToolTextToGraphParams as ToolTextToGraphParams, }; } diff --git a/src/resources/index.ts b/src/resources/index.ts index f4d6b0a..4efc706 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -54,8 +54,6 @@ export { Tools, type ToolContextAwareSplittingResponse, type ToolParsePdfResponse, - type ToolTextToGraphResponse, type ToolContextAwareSplittingParams, type ToolParsePdfParams, - type ToolTextToGraphParams, } from './tools/tools'; diff --git a/src/resources/tools/index.ts b/src/resources/tools/index.ts index 3933a16..9138e6f 100644 --- a/src/resources/tools/index.ts +++ b/src/resources/tools/index.ts @@ -5,8 +5,6 @@ export { Tools, type ToolContextAwareSplittingResponse, type ToolParsePdfResponse, - type ToolTextToGraphResponse, type ToolContextAwareSplittingParams, type ToolParsePdfParams, - type ToolTextToGraphParams, } from './tools'; diff --git a/src/resources/tools/tools.ts b/src/resources/tools/tools.ts index e1612d1..bbd5bae 100644 --- a/src/resources/tools/tools.ts +++ b/src/resources/tools/tools.ts @@ -29,17 +29,6 @@ export class Tools extends APIResource { ): Core.APIPromise { return this._client.post(`/v1/tools/pdf-parser/${fileId}`, { body, ...options }); } - - /** - * Performs name entity recognition on the supplied text accepting a maximum of - * 35000 words. - */ - textToGraph( - body: ToolTextToGraphParams, - options?: Core.RequestOptions, - ): Core.APIPromise { - return this._client.post('/v1/tools/text-to-graph', { body, ...options }); - } } export interface ToolContextAwareSplittingResponse { @@ -57,14 +46,6 @@ export interface ToolParsePdfResponse { content: string; } -export interface ToolTextToGraphResponse { - /** - * The graph structure generated from the input text, represented by a string array - * of entities and relationships. - */ - graph: Array>; -} - export interface ToolContextAwareSplittingParams { /** * The strategy to be used for splitting the text into chunks. `llm_split` uses the @@ -86,23 +67,14 @@ export interface ToolParsePdfParams { format: 'text' | 'markdown'; } -export interface ToolTextToGraphParams { - /** - * The text to be converted into a graph structure. Maximum of 35000 words. - */ - text: string; -} - Tools.Comprehend = Comprehend; export declare namespace Tools { export { type ToolContextAwareSplittingResponse as ToolContextAwareSplittingResponse, type ToolParsePdfResponse as ToolParsePdfResponse, - type ToolTextToGraphResponse as ToolTextToGraphResponse, type ToolContextAwareSplittingParams as ToolContextAwareSplittingParams, type ToolParsePdfParams as ToolParsePdfParams, - type ToolTextToGraphParams as ToolTextToGraphParams, }; export { diff --git a/tests/api-resources/tools/tools.test.ts b/tests/api-resources/tools/tools.test.ts index 48caff0..38a1517 100644 --- a/tests/api-resources/tools/tools.test.ts +++ b/tests/api-resources/tools/tools.test.ts @@ -38,19 +38,4 @@ describe('resource tools', () => { test('parsePdf: required and optional params', async () => { const response = await client.tools.parsePdf('file_id', { format: 'text' }); }); - - test('textToGraph: only required params', async () => { - const responsePromise = client.tools.textToGraph({ text: 'text' }); - const rawResponse = await responsePromise.asResponse(); - expect(rawResponse).toBeInstanceOf(Response); - const response = await responsePromise; - expect(response).not.toBeInstanceOf(Response); - const dataAndResponse = await responsePromise.withResponse(); - expect(dataAndResponse.data).toBe(response); - expect(dataAndResponse.response).toBe(rawResponse); - }); - - test('textToGraph: required and optional params', async () => { - const response = await client.tools.textToGraph({ text: 'text' }); - }); });