SummaryService class
Service class to interact with OpenAI and generate text summaries.
Constructors
- SummaryService({required String apiKey, String openAiEndpoint = 'https://api.openai.com/v1/chat/completions'})
- Creates a new instance of SummaryService.
Properties
- apiKey → String
-
Your OpenAI API key to authenticate requests.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- openAiEndpoint → String
-
The OpenAI API endpoint URL.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
summarize(
String text) → Future< String> -
Summarizes the provided
textinto a concise 3-line summary. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited