Class ChatCompletionListPageAsync
-
- All Implemented Interfaces:
-
com.openai.core.PageAsync
public final class ChatCompletionListPageAsync implements PageAsync<ChatCompletion>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
ChatCompletionListPageAsync.Builder
A builder for ChatCompletionListPageAsync.
-
Method Summary
Modifier and Type Method Description final List<ChatCompletion>
data()
Delegates to ChatCompletionListPageResponse, but gracefully handles missing data. final Optional<Boolean>
hasMore()
Delegates to ChatCompletionListPageResponse, but gracefully handles missing data. List<ChatCompletion>
items()
Returns the items in this page. Boolean
hasNextPage()
Returns whether there's another page after this one. final ChatCompletionListParams
nextPageParams()
CompletableFuture<ChatCompletionListPageAsync>
nextPage()
Returns the page after this one by making another request. final AutoPagerAsync<ChatCompletion>
autoPager()
final ChatCompletionListParams
params()
The parameters that were used to request this page. final ChatCompletionListPageResponse
response()
The response that this page was parsed from. final ChatCompletionListPageAsync.Builder
toBuilder()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ChatCompletionListPageAsync.Builder
builder()
Returns a mutable builder for constructing an instance of ChatCompletionListPageAsync. -
-
Method Detail
-
data
final List<ChatCompletion> data()
Delegates to ChatCompletionListPageResponse, but gracefully handles missing data.
-
hasMore
final Optional<Boolean> hasMore()
Delegates to ChatCompletionListPageResponse, but gracefully handles missing data.
-
items
List<ChatCompletion> items()
Returns the items in this page.
-
hasNextPage
Boolean hasNextPage()
Returns whether there's another page after this one.
The method generally doesn't make requests so the result depends entirely on the data in this page. If a significant amount of time has passed between requesting this page and calling this method, then the result could be stale.
-
nextPageParams
final ChatCompletionListParams nextPageParams()
-
nextPage
CompletableFuture<ChatCompletionListPageAsync> nextPage()
Returns the page after this one by making another request.
-
autoPager
final AutoPagerAsync<ChatCompletion> autoPager()
-
params
final ChatCompletionListParams params()
The parameters that were used to request this page.
-
response
final ChatCompletionListPageResponse response()
The response that this page was parsed from.
-
toBuilder
final ChatCompletionListPageAsync.Builder toBuilder()
-
builder
final static ChatCompletionListPageAsync.Builder builder()
Returns a mutable builder for constructing an instance of ChatCompletionListPageAsync.
The following fields are required:
.service() .streamHandlerExecutor() .params() .response()
-
-
-
-