microsoft / ai-chat-protocol

A library + API spec for easily streaming generative AI output to your chat applications.
MIT License
89 stars 11 forks source link

Adding proper error handling. #26

Closed glecaros closed 1 month ago

glecaros commented 1 month ago

This pull request includes changes to the AIChatProtocolClient class in the sdk/js/packages/client/src/client.ts file, which improve error handling and add support for localhost connections. The changes also introduce new types and modify existing ones in the sdk/js/packages/client/src/model/model.ts and spec/models.tsp files, and update the exported types in the sdk/js/packages/client/src/index.ts and sdk/js/packages/client/src/model/index.ts files. Finally, the pull request modifies the return types of operations in the spec/operations.tsp file.

Improvements to error handling and localhost support:

Changes to types:

Updates to exported types:

Changes to operation return types: