Ollama4j
A Java library (wrapper/binding) for Ollama server.
Loading...
Searching...
No Matches
io.github.ollama4j.models.response.OllamaResult Class Reference

Public Member Functions

 OllamaResult (String response, long responseTime, int httpStatusCode)
 
String toString ()
 
Map< String, Object > getStructuredResponse ()
 

Detailed Description

The type Ollama result.

Definition at line 20 of file OllamaResult.java.

Constructor & Destructor Documentation

◆ OllamaResult()

io.github.ollama4j.models.response.OllamaResult.OllamaResult ( String response,
long responseTime,
int httpStatusCode )

Definition at line 45 of file OllamaResult.java.

Member Function Documentation

◆ getStructuredResponse()

Map< String, Object > io.github.ollama4j.models.response.OllamaResult.getStructuredResponse ( )

Get the structured response if the response is a JSON object.

Returns
Map - structured response
Exceptions
IllegalArgumentExceptionif the response is not a valid JSON object

Definition at line 70 of file OllamaResult.java.

◆ toString()

String io.github.ollama4j.models.response.OllamaResult.toString ( )

Definition at line 52 of file OllamaResult.java.


The documentation for this class was generated from the following file: