Skip to content

kpechenenko/gocalcualtor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gocalcualtor

The first AI calculator written in golang.

Installation

go get "github.com/kpechenenko/gocalculator"

Usage

package main

import (
	"context"
	"fmt"

	"github.com/kpechenenko/gocalculator"
	"github.com/openai/openai-go"
	"github.com/openai/openai-go/option"
)

func main() {
	lmStudioClient := openai.NewClient(option.WithBaseURL("http://localhost:1234/v1"))

	calc := gocalculator.New(&lmStudioClient, "meta-llama-3.1-8b-instruct")

	res, _ := calc.Calculate(context.Background(), "100 * 2 + 150 - 100 / 2")
	fmt.Printf("Result: %s\n", res)
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under the MIT License.

About

The first AI calculator written in Go.

Topics

Resources

License

Stars

Watchers

Forks

Languages