DiscussService class final
An API for using Generative Language Models (GLMs) in dialog applications.
Also known as large language models (LLMs), this API provides models that are trained for multi-turn dialog.
Constructors
- DiscussService({required Client client})
-
Creates a
DiscussServiceusingclientfor transport. - DiscussService.fromApiKey([String? apiKey])
-
Creates a
DiscussServicethat does authentication through an API key.factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cancelOperation(
CancelOperationRequest request) → Future< void> -
Provides the
Operationsservice functionality in this service. -
close(
) → void - Closes the client and cleans up any resources associated with it.
-
countMessageTokens(
CountMessageTokensRequest request) → Future< CountMessageTokensResponse> - Runs a model's tokenizer on a string and returns the token count.
-
deleteOperation(
DeleteOperationRequest request) → Future< void> -
Provides the
Operationsservice functionality in this service. -
generateMessage(
GenerateMessageRequest request) → Future< GenerateMessageResponse> -
Generates a response from the model given an input
MessagePrompt. -
getOperation<
T extends ProtoMessage, S extends ProtoMessage> (Operation< T, S> request) → Future<Operation< T, S> > -
Provides the
Operationsservice functionality in this service. -
listOperations(
ListOperationsRequest request) → Future< ListOperationsResponse> -
Provides the
Operationsservice functionality in this service. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited