GemmaApiServices class
A service class that interacts with the Gemma AI API. It provides methods for health checks, generating responses from the API, and fetching URLs related to specific places.
Constructors
Properties
- baseUrl ↔ String
 - 
  Base URL for the Gemma API.
It dynamically constructs the URL using the IP and port stored in shared preferences.
  getter/setter pair
 - hashCode → int
 - 
  The hash code for this object.
  no setterinherited
 - runtimeType → Type
 - 
  A representation of the runtime type of the object.
  no setterinherited
 
Methods
- 
  fetchWebUrlsWithGemma(
String placeName, BuildContext context) → Future< List< String> > - Fetches a list of URLs related to the specified place name from the Gemma API.
 - 
  isEndpointAvailable(
BuildContext context) → Future< String>  - Checks if the Gemma API endpoint is available. Returns a localized success message if the endpoint is reachable, or an error message if not.
 - 
  isServerAvailable(
) → Future< bool>  - 
  Checks if the Gemma API server is available.
Returns 
trueif the server responds with a status code of 200,falseotherwise. - 
  noSuchMethod(
Invocation invocation) → dynamic  - 
  Invoked when a nonexistent method or property is accessed.
  inherited
 - 
  postaStreamEventsGemma(
BuildContext context, {required String input}) → Stream  - Sends a POST request to the Gemma API's RAG endpoint to generate events in a stream and yields the results as a stream of responses.
 - 
  toString(
) → String  - 
  A string representation of this object.
  inherited
 
Operators
- 
  operator ==(
Object other) → bool  - 
  The equality operator.
  inherited