langchaingo
v0.1.12
⚡ بناء التطبيقات مع LLMS من خلال التكلفة ، مع GO! ⚡
هذا هو تنفيذ لغة Go لـ Langchain.
انظر ./examples على سبيل المثال الاستخدام.
package main
import (
"context"
"fmt"
"log"
"github.com/tmc/langchaingo/llms"
"github.com/tmc/langchaingo/llms/openai"
)
func main () {
ctx := context . Background ()
llm , err := openai . New ()
if err != nil {
log . Fatal ( err )
}
prompt := "What would be a good company name for a company that makes colorful socks?"
completion , err := llms . GenerateFromSinglePrompt ( ctx , llm , prompt )
if err != nil {
log . Fatal ( err )
}
fmt . Println ( completion )
}$ go run .
Socktasticفيما يلي بعض الروابط لمشاركات المدونة والمقالات حول استخدام Langchain Go: