Skip to content

TangibleResearch/AIF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AIF

AIF is the compiled AI infrastructure object format and language/compiler package for AInfra source.

This repo contains:

  • Rust lexer
  • Rust parser
  • compiler validation
  • AIF writer
  • Rust optimizer dependency used by the compiler
  • AIF format docs
  • language docs
  • examples

Requirements

  • Git
  • Rust stable toolchain

macOS/Linux/WSL

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Setup

git clone https://github.com/TangibleResearch/AIF.git
cd AIF
cargo build --manifest-path ainfra-compiler/Cargo.toml --locked

Compile An Example

cargo run --manifest-path ainfra-compiler/Cargo.toml -- examples/local-stub.ainfra -o /tmp/local-stub.aif

The compiler emits an AIF file that can be loaded by InfraVM.

Language Shape

import ai.local.ollama

// $start$

model local {
    engine = "ollama"
    name = "llama3.2"
}

prompt answer {
    text = "Answer clearly and briefly: {input}"
}

agent helper {
    model = local
    prompt = answer
}

run agent helper on "What is PointRun?"

Docs

  • docs/language.md
  • docs/aif-format.md
  • language.md

CI/CD

GitHub Actions in .github/workflows/ci.yml builds the Rust compiler and compiles the local example into an AIF file.

License

MIT

About

The DSL language compiler for the AInfra project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages