mirror of
https://github.com/amithkoujalgi/ollama4j.git
synced 2025-10-14 01:18:58 +02:00

Moved and renamed several API documentation files for better organization, updated sidebar positions, and merged image generation docs. Added logging documentation and updated Makefile commands for docs build and serve. Improved clarity and consistency in API doc titles and structure.
25 lines
389 B
Markdown
25 lines
389 B
Markdown
---
|
|
sidebar_position: 2
|
|
---
|
|
|
|
# Timeouts
|
|
|
|
## Set Request Timeout
|
|
|
|
This API lets you set the request timeout for the Ollama client.
|
|
|
|
```java
|
|
import io.github.ollama4j.OllamaAPI;
|
|
|
|
public class Main {
|
|
|
|
public static void main(String[] args) {
|
|
|
|
String host = "http://localhost:11434/";
|
|
|
|
OllamaAPI ollamaAPI = new OllamaAPI(host);
|
|
|
|
ollamaAPI.setRequestTimeoutSeconds(10);
|
|
}
|
|
}
|
|
``` |