Skip to content

Commit 8255684

Browse files
feat(api): revert embedding -> embeddings
1 parent b6ccef3 commit 8255684

File tree

6 files changed

+16
-20
lines changed

6 files changed

+16
-20
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 4
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/isaacus%2Fisaacus-fcd541cb8fbd03d20e7f02e296ee5fe35e7e6535a6926bd46cd1c4e8423b91ff.yml
3-
openapi_spec_hash: 8c588c5cc113ffe42c5aa9ada04169ab
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/isaacus%2Fisaacus-e92a3b3731be1b1223f26fce1a50165c75ea209097e89a530a6123a59c672898.yml
3+
openapi_spec_hash: ba79dfb28159963468d872e717579e94
44
config_hash: 886b5eef0dbd90b8e6686e987a07b816

api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
Types:
44

5-
- <code><a href="./src/resources/embeddings.ts">EmbeddingCreateResponse</a></code>
5+
- <code><a href="./src/resources/embeddings.ts">Embedding</a></code>
66

77
Methods:
88

9-
- <code title="post /embeddings">client.embeddings.<a href="./src/resources/embeddings.ts">create</a>({ ...params }) -> EmbeddingCreateResponse</code>
9+
- <code title="post /embeddings">client.embeddings.<a href="./src/resources/embeddings.ts">create</a>({ ...params }) -> Embedding</code>
1010

1111
# Classifications
1212

packages/mcp-server/src/tools/embeddings/create-embeddings.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,13 @@ export const metadata: Metadata = {
1818
export const tool: Tool = {
1919
name: 'create_embeddings',
2020
description:
21-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nEmbed legal texts with an Isaacus legal AI embedder.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/embedding_create_response',\n $defs: {\n embedding_create_response: {\n type: 'object',\n title: 'Embeddings response',\n description: 'Embeddings of legal texts produced by an Isaacus legal AI embedder.',\n properties: {\n embeddings: {\n type: 'array',\n description: 'The embeddings of the inputs.',\n items: {\n type: 'object',\n title: 'Embedding',\n properties: {\n embedding: {\n type: 'array',\n description: 'The embedding of the content represented as an array of floating point numbers.',\n items: {\n type: 'number'\n }\n },\n index: {\n type: 'integer',\n description: 'The position of the content in the input array of contents, starting from `0` (and, therefore, ending at the number of contents minus `1`).'\n }\n },\n required: [ 'embedding',\n 'index'\n ]\n }\n },\n usage: {\n type: 'object',\n title: 'Embeddings usage',\n description: 'Statistics about the usage of resources in the process of embedding the inputs.',\n properties: {\n input_tokens: {\n type: 'integer',\n description: 'The number of tokens inputted to the model.'\n }\n },\n required: [ 'input_tokens'\n ]\n }\n },\n required: [ 'embeddings',\n 'usage'\n ]\n }\n }\n}\n```",
21+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nEmbed legal texts with an Isaacus legal AI embedder.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/embedding',\n $defs: {\n embedding: {\n type: 'object',\n title: 'Embedding response',\n description: 'Embeddings of legal texts produced by an Isaacus legal AI embedder.',\n properties: {\n embeddings: {\n type: 'array',\n description: 'The embeddings of the inputs.',\n items: {\n type: 'object',\n title: 'Embedding',\n properties: {\n embedding: {\n type: 'array',\n description: 'The embedding of the content represented as an array of floating point numbers.',\n items: {\n type: 'number'\n }\n },\n index: {\n type: 'integer',\n description: 'The position of the content in the input array of contents, starting from `0` (and, therefore, ending at the number of contents minus `1`).'\n }\n },\n required: [ 'embedding',\n 'index'\n ]\n }\n },\n usage: {\n type: 'object',\n title: 'Embedding usage',\n description: 'Statistics about the usage of resources in the process of embedding the inputs.',\n properties: {\n input_tokens: {\n type: 'integer',\n description: 'The number of tokens inputted to the model.'\n }\n },\n required: [ 'input_tokens'\n ]\n }\n },\n required: [ 'embeddings',\n 'usage'\n ]\n }\n }\n}\n```",
2222
inputSchema: {
2323
type: 'object',
2424
properties: {
2525
model: {
2626
type: 'string',
27-
description:
28-
'The ID of the [model](https://docs.isaacus.com/models#embeddings) to use for embedding.',
27+
description: 'The ID of the [model](https://docs.isaacus.com/models#embedding) to use for embedding.',
2928
enum: ['kanon-2-embedder'],
3029
},
3130
texts: {

src/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import * as Errors from './core/error';
1616
import * as Uploads from './core/uploads';
1717
import * as API from './resources/index';
1818
import { APIPromise } from './core/api-promise';
19-
import { EmbeddingCreateParams, EmbeddingCreateResponse, Embeddings } from './resources/embeddings';
19+
import { Embedding, EmbeddingCreateParams, Embeddings } from './resources/embeddings';
2020
import { Reranking, RerankingCreateParams, Rerankings } from './resources/rerankings';
2121
import { Classifications } from './resources/classifications/classifications';
2222
import { Extractions } from './resources/extractions/extractions';
@@ -733,7 +733,7 @@ export declare namespace Isaacus {
733733

734734
export {
735735
Embeddings as Embeddings,
736-
type EmbeddingCreateResponse as EmbeddingCreateResponse,
736+
type Embedding as Embedding,
737737
type EmbeddingCreateParams as EmbeddingCreateParams,
738738
};
739739

src/resources/embeddings.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,27 @@ export class Embeddings extends APIResource {
1919
* });
2020
* ```
2121
*/
22-
create(body: EmbeddingCreateParams, options?: RequestOptions): APIPromise<EmbeddingCreateResponse> {
22+
create(body: EmbeddingCreateParams, options?: RequestOptions): APIPromise<Embedding> {
2323
return this._client.post('/embeddings', { body, ...options });
2424
}
2525
}
2626

2727
/**
2828
* Embeddings of legal texts produced by an Isaacus legal AI embedder.
2929
*/
30-
export interface EmbeddingCreateResponse {
30+
export interface Embedding {
3131
/**
3232
* The embeddings of the inputs.
3333
*/
34-
embeddings: Array<EmbeddingCreateResponse.Embedding>;
34+
embeddings: Array<Embedding.Embedding>;
3535

3636
/**
3737
* Statistics about the usage of resources in the process of embedding the inputs.
3838
*/
39-
usage: EmbeddingCreateResponse.Usage;
39+
usage: Embedding.Usage;
4040
}
4141

42-
export namespace EmbeddingCreateResponse {
42+
export namespace Embedding {
4343
export interface Embedding {
4444
/**
4545
* The embedding of the content represented as an array of floating point numbers.
@@ -66,7 +66,7 @@ export namespace EmbeddingCreateResponse {
6666

6767
export interface EmbeddingCreateParams {
6868
/**
69-
* The ID of the [model](https://docs.isaacus.com/models#embeddings) to use for
69+
* The ID of the [model](https://docs.isaacus.com/models#embedding) to use for
7070
* embedding.
7171
*/
7272
model: 'kanon-2-embedder';
@@ -109,8 +109,5 @@ export interface EmbeddingCreateParams {
109109
}
110110

111111
export declare namespace Embeddings {
112-
export {
113-
type EmbeddingCreateResponse as EmbeddingCreateResponse,
114-
type EmbeddingCreateParams as EmbeddingCreateParams,
115-
};
112+
export { type Embedding as Embedding, type EmbeddingCreateParams as EmbeddingCreateParams };
116113
}

src/resources/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
export { Classifications } from './classifications/classifications';
4-
export { Embeddings, type EmbeddingCreateResponse, type EmbeddingCreateParams } from './embeddings';
4+
export { Embeddings, type Embedding, type EmbeddingCreateParams } from './embeddings';
55
export { Extractions } from './extractions/extractions';
66
export { Rerankings, type Reranking, type RerankingCreateParams } from './rerankings';

0 commit comments

Comments
 (0)