Skip to content

oceanplexian/ai-summarizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Go Ollama Structured Output Analyzer

Analyzes text using Ollama's structured output feature.

Reads text from stdin, sends it to a local Ollama instance with a JSON schema, and outputs the structured JSON result.

Installation & Setup

  1. Install Homebrew (if you don't have it):

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

    (See brew.sh for details)

  2. Install Go:

    brew install go
  3. Install & Run Ollama: Follow instructions at ollama.com. Ensure Ollama is running.

  4. Pull the Ollama Model: The required model is specified in config.json. Pull it:

    # Example using the default model in config.json
    ollama pull eramax/gemma-3-27b-it-qat:q4_0

Configuration

Edit config.json:

{
  "ollama_url": "http://127.0.0.1:11434/api/chat",
  "model_name": "eramax/gemma-3-27b-it-qat:q4_0"
}
  • ollama_url: Your Ollama API endpoint.
  • model_name: The Ollama model to use (must be pulled).

Usage

Pipe text via stdin:

cat your_input_file.txt | go run main.go

Or:

echo "Your text here" | go run main.go

Output

Outputs raw JSON corresponding to the TicketAnalysis struct in main.go.

Example:

{"support_area":"Login Issue","summary":"User cannot log in despite using correct password and password reset email is not arriving.","urgency":"High"}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages