Skip to content

Conversation

@annelo-msft
Copy link
Owner

@annelo-msft annelo-msft commented Jul 17, 2024

…lt and having factory methods to different LRO types for convenience and streaming
annelo-msft and others added 30 commits July 22, 2024 17:07
In [System.ClientModel 1.1.0-beta.5](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/System.ClientModel/CHANGELOG.md#110-beta5-2024-07-11), `PageableCollection<T>` was changed to `PageCollection<T>` to better align convenience and protocol methods.

This PR upgrades the OpenAI library to SCM 1.1.0-beta.5, and manually implements internal types that will be generated from TypeSpec API specification in the future.  Specifically, it:

- Updates return types that have been renamed for streaming service methods
- For service methods corresponding to paginated-collection endpoints
  - Returns `PageCollection<T>` or `AsyncPageCollection<T>` from convenience methods
  - Takes `XxCollectionOptions` types that describe the paginated collection to be returned
  - Adds "rehydration" methods that return a collection that starts where another collection type left off via a persisted rehydration token
  - Returns `IEnumerable<ClientResult>` or `IAsyncEnumerable<ClientResult>` from protocol methods, representing a collection of service responses, where each corresponds to a page of results returned from the paginated endpoint
  - Implements internal page enumerator and page token types for each paginated-endpoint operation

Types that are intended to be output by the generator have been added in a temporary folder called `To.Be.Generated`.
…te enumerator instance until MoveNext is called
This PR updates the init to set.

The API will be updated in the following PR.
… very close to the issue templates found in the other repos, like openai-python. (openai#146)

Co-authored-by: Angelos Petropoulos <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants