From 756fd69e1ce2ac000f0214869dac7d0ae0a65f06 Mon Sep 17 00:00:00 2001 From: afel Date: Thu, 6 Jun 2024 08:01:59 +0200 Subject: [PATCH] update langfuse docs --- .../observability/langfuse_integration.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/my-website/docs/observability/langfuse_integration.md b/docs/my-website/docs/observability/langfuse_integration.md index 6dd5377ea7..06a3753fb3 100644 --- a/docs/my-website/docs/observability/langfuse_integration.md +++ b/docs/my-website/docs/observability/langfuse_integration.md @@ -144,6 +144,26 @@ print(response) ``` +You can also pass `metadata` as part of the request header with a `langfuse_*` prefix: + +```shell +curl --location 'http://0.0.0.0:4000/chat/completions' \ + --header 'Content-Type: application/json' \ + --header 'langfuse_trace_id: trace-id22' \ + --header 'langfuse_trace_user_id: user-id2' \ + --header 'langfuse_trace_metadata: {"key":"value"}' + --data '{ + "model": "gpt-3.5-turbo", + "messages": [ + { + "role": "user", + "content": "what llm are you" + } + ] +}' +``` + + ### Trace & Generation Parameters #### Trace Specific Parameters