Skip to content

Commit f86e9ef

Browse files
authored
docs: Update Ollama integration documentation with new environment variables
- Added standard OpenAI SDK environment variables (OPENAI_BASE_URL, MODEL_NAME) - Documented alternative patterns (OLLAMA_API_BASE) from community feedback - Added complete usage example with praisonai --init - Maintained backward compatibility documentation for legacy patterns Related to MervinPraison#394 - Now users have clear documentation on how to properly configure Ollama with the fixed environment variable support.
1 parent c405814 commit f86e9ef

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

docs/models/ollama.mdx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,41 @@ icon: "terminal"
1010

1111
<AccordionGroup>
1212
<Accordion title="Ollama Integration" defaultOpen>
13+
**Standard OpenAI SDK Environment Variables (Recommended):**
1314
```bash
1415
export OPENAI_BASE_URL=http://localhost:11434/v1
16+
export MODEL_NAME=deepseek-r1:14b
17+
export OPENAI_API_KEY=NA
18+
```
19+
20+
**Alternative Environment Variable Patterns:**
21+
```bash
22+
# Community recommended pattern
23+
export OLLAMA_API_BASE=http://localhost:11434
24+
export MODEL_NAME=gemma3:4b
25+
export OPENAI_API_KEY=fake-key
26+
27+
# Legacy pattern (still supported)
28+
export OPENAI_API_BASE=http://localhost:11434/v1
29+
export OPENAI_MODEL_NAME=llama2
30+
export OPENAI_API_KEY=not-needed
31+
```
32+
33+
**Usage with praisonai --init:**
34+
```bash
35+
# Make sure Ollama is running
36+
ollama serve
37+
38+
# Pull your desired model
39+
ollama pull deepseek-r1:14b
40+
41+
# Set environment variables
42+
export OPENAI_BASE_URL=http://localhost:11434/v1
43+
export MODEL_NAME=deepseek-r1:14b
44+
export OPENAI_API_KEY=NA
45+
46+
# Initialize agents
47+
praisonai --init "Create a story about AI"
1548
```
1649
</Accordion>
1750
</AccordionGroup>

0 commit comments

Comments
 (0)