-
Notifications
You must be signed in to change notification settings - Fork 46
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
feat: add InitTrace to Langfuse #146
base: main
Are you sure you want to change the base?
Conversation
235824c
to
70aa57d
Compare
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.
license-eye has totally checked 268 files.
Valid | Invalid | Ignored | Fixed |
---|---|---|---|
267 | 1 | 0 | 0 |
Click to see the invalid file list
- callbacks/langfuse/trace.go
go-test-coverage report:
|
70aa57d
to
cd096db
Compare
cd096db
to
c0721da
Compare
00ef155
to
96d9c4f
Compare
callbacks/langfuse/trace.go
Outdated
"github.com/cloudwego/eino-ext/libs/acl/langfuse" | ||
) | ||
|
||
func (c *CallbackHandler) InitTrace(ctx context.Context, opts ...TraceOption) (context.Context, error) { |
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.
- 这个用起来不太方便,所有需要请求粒度注入 TraceOption 的地方,都需要能拿到 CallbackHandler 实例。
- 感觉数据的传递也不是很纯粹,即使用了 context, 也是使用了 state 实例
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.
done
96d9c4f
to
11f9d50
Compare
callbacks/langfuse/langfuse.go
Outdated
return &model.CallbackInput{Config: &model.Config{}} | ||
} | ||
if in.Config == nil { | ||
in.Config = &model.Config{} |
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.
这里 set 可能有并发问题,如果必须非空的话开个新的 *model.CallbackInput 吧。
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.
done,不改了
11f9d50
to
47943fd
Compare
What type of PR is this?
Check the PR title.
(Optional) Translate the PR title into Chinese.
(Optional) More detailed description for this PR(en: English/zh: Chinese).
en:
zh(optional):
(Optional) Which issue(s) this PR fixes:
(optional) The PR that updates user documentation: