From 21cccd02e8d47810de2990451bd959e18e4e3679 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Mon, 1 Jan 2024 11:53:38 +0530 Subject: [PATCH] (docs) langfuse + langchain log metadata --- docs/my-website/docs/proxy/logging.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/my-website/docs/proxy/logging.md b/docs/my-website/docs/proxy/logging.md index ae46c6433..55fe6b8e2 100644 --- a/docs/my-website/docs/proxy/logging.md +++ b/docs/my-website/docs/proxy/logging.md @@ -567,9 +567,17 @@ from langchain.prompts.chat import ( from langchain.schema import HumanMessage, SystemMessage chat = ChatOpenAI( - openai_api_base="http://0.0.0.0:8000", # set openai_api_base to the LiteLLM Proxy + openai_api_base="http://0.0.0.0:8000", model = "gpt-3.5-turbo", - temperature=0.1 + temperature=0.1, + extra_body={ + "metadata": { + "generation_name": "ishaan-generation-langchain-client", + "generation_id": "langchain-client-gen-id22", + "trace_id": "langchain-client-trace-id22", + "trace_user_id": "langchain-client-user-id2" + } + } ) messages = [