diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c23bd9..6a318f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,20 @@ All notable changes to this project will be documented in this file. +## [0.5.1](https://github.com/inference-gateway/typescript-sdk/compare/v0.5.0...v0.5.1) (2025-04-27) + +### 🐛 Bug Fixes + +* Update FunctionParameters schema to enforce required properties and adjust ListModelsResponse structure ([#9](https://github.com/inference-gateway/typescript-sdk/issues/9)) ([ffa4709](https://github.com/inference-gateway/typescript-sdk/commit/ffa470907a11aca26dd29f63ca70d17954a67d17)) + +### 📚 Documentation + +* Add required fields to Model schema and clean up application settings ([7338c28](https://github.com/inference-gateway/typescript-sdk/commit/7338c28c0b8dd67f2c0faefc758cc3344de5c9d6)) + +### 🔧 Miscellaneous + +* **tests:** Format test ([9f121a7](https://github.com/inference-gateway/typescript-sdk/commit/9f121a742d33cd9fa2776dc5fdc5f229f898ccd0)) + ## [0.5.0](https://github.com/inference-gateway/typescript-sdk/compare/v0.4.1...v0.5.0) (2025-04-26) ### ✨ Features diff --git a/openapi.yaml b/openapi.yaml index e15c6a2..1867ba0 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -624,6 +624,9 @@ components: items: $ref: "#/components/schemas/Model" default: [] + required: + - object + - data FunctionObject: type: object properties: @@ -671,18 +674,7 @@ components: documentation about the format. Omitting `parameters` defines a function with an empty parameter list. - properties: - type: - type: string - description: The type of the parameters. Currently, only `object` is supported. - properties: - type: object - description: The properties of the parameters. - required: - type: array - items: - type: string - description: The required properties of the parameters. + additionalProperties: true ChatCompletionToolType: type: string description: The type of the tool. Currently, only `function` is supported. @@ -1060,11 +1052,6 @@ components: - general: title: "General settings" settings: - - name: application_name - env: "APPLICATION_NAME" - type: string - default: "inference-gateway" - description: "The name of the application" - name: environment env: "ENVIRONMENT" type: string diff --git a/package.json b/package.json index 73f99b1..0e8e405 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@inference-gateway/sdk", - "version": "0.5.0", + "version": "0.5.1", "description": "An SDK written in Typescript for the [Inference Gateway](https://github.com/inference-gateway/inference-gateway).", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", diff --git a/src/types/generated/index.ts b/src/types/generated/index.ts index 51ca143..1936db3 100644 --- a/src/types/generated/index.ts +++ b/src/types/generated/index.ts @@ -213,7 +213,7 @@ export interface components { /** @description Response structure for listing models */ ListModelsResponse: { provider?: components['schemas']['Provider']; - object?: string; + object: string; /** @default [] */ data: components['schemas']['Model'][]; }; @@ -236,12 +236,7 @@ export interface components { /** @description The parameters the functions accepts, described as a JSON Schema object. See the [guide](/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. * Omitting `parameters` defines a function with an empty parameter list. */ FunctionParameters: { - /** @description The type of the parameters. Currently, only `object` is supported. */ - type?: string; - /** @description The properties of the parameters. */ - properties?: Record; - /** @description The required properties of the parameters. */ - required?: string[]; + [key: string]: unknown; }; /** * @description The type of the tool. Currently, only `function` is supported. diff --git a/tests/client.test.ts b/tests/client.test.ts index adb439f..eabc7a8 100644 --- a/tests/client.test.ts +++ b/tests/client.test.ts @@ -266,9 +266,7 @@ describe('InferenceGatewayClient', () => { it('should handle streaming chat completions reasoning and content', async () => { const mockRequest = { model: 'gpt-4o', - messages: [ - { role: MessageRole.user, content: 'Hello' }, - ], + messages: [{ role: MessageRole.user, content: 'Hello' }], stream: true, }; const mockStream = new TransformStream();