AI Tools

From Izara Wiki
Jump to navigation Jump to search

Overview

AI tools for developing projects, testing code, etc.

File Structure

  • Tools are run from developers local computer
  • Some folders will be clones of online repositories
root_folder/
├── ai_tool/
│   ├── ...
│   └── ...
├── generate_md/
│   ├── service_a
│   │   └── ...
│   └── service_b
│       └── ...
├── structure_md/
│   ├── structure
│   └── nodejs
├── service
│   ├── service_a
│   │   └── ...
│   └── service_b
│       └── ...
├── model/
│   ├── model_client.py 
│   ├── setting_models.py 
│   └── fallback_models.py
├── tmp/
|   └── ...
├── main.py
├── generate_md.py
└── .env

ai_tool

  • each tool have it's own repository
  • each repository clones into this folder
  • some tools will be shared code
  • some will be dependent on other tools

generate_md

  • generated MD files used by tools
  • tools will often check if MD file exists, if not will create it (cache)
  • method of re-generating MD (invalidate cache)
  • many MDs can be shared and versioned, in which case create repositories that developers can share, each with it's own sub-folder

structure_md

  • provides guidelines for the AI to understand the structure and organization of the codebase.
  • used in certain operations, such as analyze and fix, where the AI needs to understand the underlying structural logic of the code.
  • currently maintained manually as a Markdown file rather than being generated by AI.

service

  • clone of each service in it's own sub-folder
  • functions like a real clone of the repository, no ai artifacts in these folders
  • code updates can be made in these folders, committed and pushed

model

  • model_client.py - handles communication with the AI models through the pipeline for each ai_tool.
  • setting_models.py - handles model configuration based on the specified model name. It validates the model and retrieves the corresponding API key, URL, and model name from the .env file.
  • fallback_models.py - handles fallback logic by switching to an alternative model when the primary model fails.

tmp

  • temporary files used by ai tools
  • not used for long term or shared cached data

root_folder

  • main.py - Serves as the main entry point of the application and starts the overall workflow.
  • generate_md.py - Selects the appropriate service from service/, sends it to the AI to generate the required knowledge content, and saves the generated output in generate_md/.
  • update_hash.py - A script to update the hash IDs of all node_modules to tools. Run this script once whenever node_modules is updated, before starting the application.
  • .env - Stores the API keys, URLs, and model configurations used by the application. Each configuration can be assigned a custom name and referenced in modelConfig/ to specify which AI model should be used at each stage of the workflow.
# .env
# copy this file to .env (same folder) and fill in real values.

# --- Local Ollama
OLLAMA_MODEL=IzaraProject
OLLAMA_HOST=http://localhost:11434
OLLAMA_KEEP_ALIVE=30m
OLLAMA_NUM_CTX=32768
OLLAMA_NUM_PREDICT=8192

# --- HTTP timeouts (seconds)
API_TIMEOUT=600
OLLAMA_TIMEOUT=600

# --- OpenAI-compatible providers -------------------------------------------------------------
# NAME is what a component's modelConfig/config.py puts in STEP_MODELS; MODEL is what the provider
# serves; URL is the base URL (no /chat/completions — the client appends it).
API = [
  {
    NAME: 'deepseek',
    API_KEY: '***',
    URL: 'https://api.deepseek.com/v1',
    MODEL: 'deepseek-v4-flash'
  },
  {
    NAME: 'openrouter',
    API_KEY: '***',
    URL: 'https://openrouter.ai/api/v1',
    MODEL: 'ox-alpha'
  },
  {
    NAME: 'openzen',
    API_KEY: '***',
    URL: 'https://your-provider.example/v1',
    MODEL: 'nemotron-3-ultra-free'
  },
]

Working documents

AI Tools