mirror of
				https://github.com/amithkoujalgi/ollama4j.git
				synced 2025-11-04 10:30:41 +01:00 
			
		
		
		
	- 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.
		
			
				
	
	
		
			25 lines
		
	
	
		
			391 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			391 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.Ollama;
 | 
						|
 | 
						|
public class Main {
 | 
						|
 | 
						|
    public static void main(String[] args) {
 | 
						|
 | 
						|
        String host = "http://localhost:11434/";
 | 
						|
 | 
						|
        Ollama ollama = new Ollama(host);
 | 
						|
 | 
						|
        ollama.setRequestTimeoutSeconds(10);
 | 
						|
    }
 | 
						|
}
 | 
						|
``` |