Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,19 @@ import (
)

func main() {
cbh, flusher := NewLangfuseHandler(&_Config_{
cbh, flusher := langfuse.NewLangfuseHandler(&langfuse.Config{
Host: "https://cloud.langfuse.com",
PublicKey: "pk-xxx",
SecretKey: "sk-xxx",
})
defer flusher() // Exit after all trace reporting is complete

callbacks.AppendGlobalHandlers(cbh) // Set langfuse as a global callback

g := NewGraph[string,string]()
/*
* compose and run graph
*/

flusher() // Exit after all trace reporting is complete
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,19 @@ import (
)

func main() {
cbh, flusher := NewLangfuseHandler(&_Config_{
cbh, flusher := langfuse.NewLangfuseHandler(&langfuse.Config{
Host: "https://cloud.langfuse.com",
PublicKey: "pk-xxx",
SecretKey: "sk-xxx",
})

defer flusher() // 等待所有trace上报完成后退出

callbacks.AppendGlobalHandlers(cbh) // 设置langfuse为全局callback

g := NewGraph[string,string]()
/*
* compose and run graph
*/

flusher() // 等待所有trace上报完成后退出
}
```

Expand Down