-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add langchain #339
base: main
Are you sure you want to change the base?
Add langchain #339
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great works!
Key: "module-name", | ||
Value: attribute.StringValue(request.moduleName), | ||
}, attribute.KeyValue{ | ||
Key: "system", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please adjust these existing attribute keys according to OTel semconv?
https://opentelemetry.io/docs/specs/semconv/gen-ai/gen-ai-spans/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
稍后我看下
{ | ||
"Version": "[0.1.13,)", | ||
"ImportPath": "github.com/tmc/langchaingo/llms", | ||
"Function": "GenerateFromSinglePrompt", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just out of curiosity: Does langchaingo support for streaming api? (I haven't notice a similar one)
cla requires signature |
rebase main to fix TestLatestDepth / build (pull_request) |
# Conflicts: # go.mod # go.sum # pkg/data/default.json # pkg/inst-api/utils/scope.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty great! But there are some details that need to be adjusted.
BTW, OTel has conventions about input & output now, indeed. But please don't worry about that, these semantic conventions are still changeable so you could capture them in a way you prefer.
return | ||
} | ||
if err != nil { | ||
langChainCommonInstrument.End(ctx, request, nil, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lines 52-55 are needless
langchain追踪,添加了chains,agentAction代理处理,向量数据库查询,嵌入模型调用,llm调用几个点到追踪,由于各个具体模块都是由接口来规范的,所以只能定位到接口用的上一层,例如tool工具类,但每一个agentAction就是一个具体工具动作。另外无法使用callback的钩子函数,1,会出现被用户覆盖情况,2,也有因为接口规范原因无法注入