Files
ollama4j/docs/docs/apis-extras/timeouts.md
amithkoujalgi f114181fe2 Update documentation and refactor code to replace OllamaAPI with Ollama
- Replaced all instances of `OllamaAPI` with `Ollama` in documentation and code examples for consistency.
- Enhanced the configuration for handling broken markdown links in Docusaurus.
- Updated integration tests and example code snippets to reflect the new class structure.
2025-09-29 09:31:32 +05:30

391 B

sidebar_position
sidebar_position
2

Timeouts

Set Request Timeout

This API lets you set the request timeout for the Ollama client.

import io.github.ollama4j.Ollama;

public class Main {

    public static void main(String[] args) {

        String host = "http://localhost:11434/";

        Ollama ollama = new Ollama(host);

        ollama.setRequestTimeoutSeconds(10);
    }
}