为什么要fork这个项目?
在使用项目过程中,有一些设计让我感觉用起来会有点难受,在上层也无法hack,即使可以hack,也会使代码非常丑陋
其次,有一些我认为必要的逻辑是存在缺失的,类似于agent里面无法使用vector、向量搜索无法显示score让我无法回测以确定score、agent无法设置LLM的参数等等,而这些问题作者也不鸟我!!!
最后,作者是国外的大神,但是对于国内的一些工具和模型更新较少,在监管下,总是会有些不便
所以,我fork了整个项目,并为此提供所需的能力支撑
同时,会定期merge源项目,保持能力一致
如果有pr和issue,欢迎来砸
⚡ Building applications with LLMs through composability, with Go! ⚡
This is the Go language implementation of LangChain.
See ./examples for example usage.
package main
import (
"context"
"log"
"github.com/tyloafer/langchaingo/llms/openai"
)
func main() {
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 := llm.Call(context.Background(), prompt)
if err != nil {
log.Fatal(err)
}
log.Println(completion)
}
$ go run .
Socktastic!
Here are some links to blog posts and articles on using Langchain Go:
- Using Ollama with LangChainGo - Nov 2023
- Creating a simple ChatGPT clone with Go - Aug 2023
- Creating a ChatGPT Clone that Runs on Your Laptop with Go - Aug 2023