Skip to content
/ goai Public

A friendly API and abstractions for developing AI applications.

License

Notifications You must be signed in to change notification settings

tech1024/goai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go AI

build Coverage Status Go Report Card Godoc Release

A golang API library for AI Engineering.

This is a high level feature overview.

  • Chat Completion
  • Embedding

Installation

go get -u 'github.com/tech1024/goai'

Getting Started

package main

import (
	"context"
	"log"

	"github.com/tech1024/goai"
	"github.com/tech1024/goai/provider/ollama"
)

func main() {
	ollamaClient, _ := ollama.NewClient("http://127.0.0.1:11434")
	chat := goai.NewChat(ollama.NewNewChatModel(ollamaClient, "deepseek-r1"))
	result, err := chat.Chat(context.Background(), "What can you do for me ?")
	if err != nil {
		log.Fatal(err)
	}

	log.Println(result)
}

License

This project is licensed under the Apache 2.0 license.

Contact

If you have any issues or feature requests, please contact us. PR is welcomed.