Spaces:
Running
Running
Elimina el decorador `@traceable` de la función `respond` en `app.py`, simplificando la gestión de trazas en el sistema. Esta modificación se realiza para optimizar el rendimiento y la claridad del código, manteniendo la funcionalidad principal de la respuesta del asistente.
Browse files
app.py
CHANGED
|
@@ -7,7 +7,6 @@ import mimetypes
|
|
| 7 |
import gradio as gr
|
| 8 |
from openai import OpenAI
|
| 9 |
from dotenv import load_dotenv
|
| 10 |
-
from langsmith import traceable
|
| 11 |
from langsmith import Client as LangSmithClient
|
| 12 |
from langsmith.run_trees import RunTree
|
| 13 |
|
|
@@ -194,7 +193,6 @@ def _history_preview(history: list[tuple[str, str]] | None, max_turns: int = 3,
|
|
| 194 |
return _preview_text(joined, max_chars)
|
| 195 |
|
| 196 |
|
| 197 |
-
@traceable
|
| 198 |
def respond(message, history: list[tuple[str, str]]):
|
| 199 |
"""Stream assistant reply via Gemini using OpenAI-compatible API.
|
| 200 |
|
|
|
|
| 7 |
import gradio as gr
|
| 8 |
from openai import OpenAI
|
| 9 |
from dotenv import load_dotenv
|
|
|
|
| 10 |
from langsmith import Client as LangSmithClient
|
| 11 |
from langsmith.run_trees import RunTree
|
| 12 |
|
|
|
|
| 193 |
return _preview_text(joined, max_chars)
|
| 194 |
|
| 195 |
|
|
|
|
| 196 |
def respond(message, history: list[tuple[str, str]]):
|
| 197 |
"""Stream assistant reply via Gemini using OpenAI-compatible API.
|
| 198 |
|