mirror of
				https://github.com/amithkoujalgi/ollama4j.git
				synced 2025-11-04 10:30:41 +01:00 
			
		
		
		
	- Replaced instances of `OllamaAPI` with `Ollama` across the codebase for consistency. - Updated example code snippets in documentation to reflect the new class name. - Enhanced metrics collection setup in the documentation. - Added integration tests for the new `Ollama` class to ensure functionality remains intact.
		
			
				
	
	
		
			27 lines
		
	
	
		
			626 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			626 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
---
 | 
						|
sidebar_position: 5
 | 
						|
---
 | 
						|
 | 
						|
# PS
 | 
						|
 | 
						|
This API provides a list of running models and details about each model currently loaded into memory.
 | 
						|
 | 
						|
This API corresponds to the [PS](https://github.com/ollama/ollama/blob/main/docs/api.md#list-running-models) API.
 | 
						|
 | 
						|
```java
 | 
						|
package io.github.ollama4j.localtests;
 | 
						|
 | 
						|
import io.github.ollama4j.Ollama;
 | 
						|
import io.github.ollama4j.models.ps.ModelProcessesResult;
 | 
						|
 | 
						|
public class Main {
 | 
						|
    public static void main(String[] args) {
 | 
						|
 | 
						|
        Ollama ollama = new Ollama("http://localhost:11434");
 | 
						|
 | 
						|
        ModelProcessesResult response = ollama.ps();
 | 
						|
 | 
						|
        System.out.println(response);
 | 
						|
    }
 | 
						|
}
 | 
						|
``` |