mirror of
				https://github.com/amithkoujalgi/ollama4j.git
				synced 2025-11-04 02:20:50 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			376 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			376 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
---
 | 
						|
sidebar_position: 2
 | 
						|
---
 | 
						|
 | 
						|
# 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);
 | 
						|
  }
 | 
						|
}
 | 
						|
``` |