Ai Chat Unix Tool

AI Model Conversation Interface using Ollama

🤖 Overview

The Chat Unix Tool is a powerful command-line application that facilitates conversations between two AI models using the ollama_gen library. It creates dynamic dialogues where models respond to each other, generating engaging conversations that can be saved as HTML files.

đŸ’Ŧ

Interactive Chat

Real-time conversation between two AI models

📄

HTML Export

Save conversations as styled HTML files

đŸŽ¯

Seeded Prompts

Control conversation direction with initial seeds

⚡

Real-time Output

Watch conversations unfold in real-time

📋 Command Arguments

Argument Position Required Description Example
<host> 1 ✅ Yes Ollama server host address localhost:11434
<model1> 2 ✅ Yes First AI model name qwen3, llama3, mistral
<model2> 3 ✅ Yes Second AI model name deepseek-r1, codegemma
<seed> 4 ✅ Yes Initial conversation prompt/topic "Explain quantum computing"
<filename> 5 ❌ Optional Output HTML file path chat.html, conversation.html

<host> Position 1

✅ Required
Ollama server host address
Example: localhost:11434

<model1> Position 2

✅ Required
First AI model name
Example: qwen3, llama3, mistral

<model2> Position 3

✅ Required
Second AI model name
Example: deepseek-r1, codegemma

<seed> Position 4

✅ Required
Initial conversation prompt/topic
Example: "Explain quantum computing"

<filename> Position 5

❌ Optional
Output HTML file path
Example: chat.html, conversation.html

🚀 Usage Examples

Basic Usage (Console Only)

./chat_unix localhost:11434 qwen3:latest deepseek-r1:latest "Why is C++ the best programming language?"

This will start a conversation between qwen3 and deepseek-r1 about C++ programming, displaying output only in the console.

With HTML Output

./chat_unix localhost:11434 llama3:latest mistral:latest "Discuss artificial intelligence ethics" ai_ethics.html

This saves the conversation to an HTML file with styled formatting for easy reading and sharing.

Creative Writing Session

./chat_unix localhost:11434 qwen3:latest codegemma "Write a collaborative short story about space exploration" story.html

Models will collaborate on creative writing, with the full conversation saved as an HTML document.

đŸ› ī¸ Building and Installation

# Clone the repository
git clone https://github.com/lostjared/ollama_gen.git
# Navigate to the ollama_gen directory
cd ollama_gen
# Ensure you have CMake installed
# Install dependencies (if needed)
sudo apt-get install cmake g++ libcurl4-openssl-dev 
# Create a build directory
mkdir build && cd build
# Configure the project
cmake ..
# Build the project
cmake --build .        
#  install the library
sudo cmake --install .

# Navigate to the chat_unix directory
cd chat_unix

# Create build directory
mkdir build && cd build

# Configure and build
cmake ..
cmake --build .
# Run the application
./chat_unix <host> <model1> <model2> <seed> [filename]

âš ī¸ Important Notes