Skip to content
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

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

Add langchain #339

wants to merge 17 commits into from

Conversation

thinkdb1
Copy link

@thinkdb1 thinkdb1 commented Mar 6, 2025

langchain追踪,添加了chains,agentAction代理处理,向量数据库查询,嵌入模型调用,llm调用几个点到追踪,由于各个具体模块都是由接口来规范的,所以只能定位到接口用的上一层,例如tool工具类,但每一个agentAction就是一个具体工具动作。另外无法使用callback的钩子函数,1,会出现被用户覆盖情况,2,也有因为接口规范原因无法注入

@CLAassistant
Copy link

CLAassistant commented Mar 6, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@Cirilla-zmh Cirilla-zmh left a 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",
Copy link
Contributor

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/

Copy link
Author

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",
Copy link
Contributor

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)

@NameHaibinZhang
Copy link
Collaborator

cla requires signature

@NameHaibinZhang
Copy link
Collaborator

rebase main to fix TestLatestDepth / build (pull_request)

Copy link
Contributor

@Cirilla-zmh Cirilla-zmh left a 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)
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants