mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-07-10 16:23:44 +00:00
feat: Use agent name as dynamic Langfuse trace name
Fall back to model name, then 'AgentRun' when agent name is unavailable.
This commit is contained in:
parent
d5d16da0b1
commit
3919d005e5
3 changed files with 4 additions and 4 deletions
|
|
@ -725,7 +725,7 @@ class AgentClient extends BaseClient {
|
|||
const agentsEConfig = appConfig.endpoints?.[EModelEndpoint.agents];
|
||||
|
||||
config = {
|
||||
runName: 'AgentRun',
|
||||
runName: this.options.agent.name || this.model || 'AgentRun',
|
||||
configurable: {
|
||||
thread_id: this.conversationId,
|
||||
last_agent_index: this.agentConfigs?.size ?? 0,
|
||||
|
|
|
|||
|
|
@ -466,7 +466,7 @@ const OpenAIChatCompletionController = async (req, res) => {
|
|||
|
||||
// Process the stream
|
||||
const config = {
|
||||
runName: 'AgentRun',
|
||||
runName: agent.name || agent.model_parameters?.model || 'AgentRun',
|
||||
configurable: {
|
||||
thread_id: conversationId,
|
||||
user_id: userId,
|
||||
|
|
|
|||
|
|
@ -482,7 +482,7 @@ const createResponse = async (req, res) => {
|
|||
|
||||
// Process the stream
|
||||
const config = {
|
||||
runName: 'AgentRun',
|
||||
runName: agent.name || agent.model_parameters?.model || 'AgentRun',
|
||||
configurable: {
|
||||
thread_id: conversationId,
|
||||
user_id: userId,
|
||||
|
|
@ -638,7 +638,7 @@ const createResponse = async (req, res) => {
|
|||
}
|
||||
|
||||
const config = {
|
||||
runName: 'AgentRun',
|
||||
runName: agent.name || agent.model_parameters?.model || 'AgentRun',
|
||||
configurable: {
|
||||
thread_id: conversationId,
|
||||
user_id: userId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue