dimagi / open-chat-studio

A web based platform for building Chatbots backed by Large Language Models
BSD 3-Clause "New" or "Revised" License
16 stars 7 forks source link

Expose open AI assistant and langfuse trace info #835

Closed snopoke closed 2 weeks ago

snopoke commented 2 weeks ago

Description

This PR includes a few changes:

  1. Display OpenAI Assistant ID and Thread ID in the session view when available

Peek 2024-11-07 12-03

  1. Store the Langfuse trace ID and URL in the chat message metadata
  2. Display a link to the Langfuse trace in the session view

image

  1. Display a link to the Langfuse trace in the chat view when debug mode is on

image

User Impact

  1. Fix a JS error I noticed in the chat UI when assistants aren't enabled
codecov-commenter commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 63.93443% with 22 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
apps/service_providers/tracing/service.py 42.85% 16 Missing :warning:
apps/service_providers/llm_service/state.py 75.00% 5 Missing :warning:
apps/chat/models.py 66.66% 1 Missing :warning:
Additional details and impacted files

:loudspeaker: Thoughts on this report? Let us know!

sentry-io[bot] commented 2 weeks ago

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

Did you find this useful? React with a 👍 or 👎