mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-04-06 03:03:36 +00:00
Integrate Langsmith for conversation tracking
Added support for Langsmith API key to enable conversation viewing.
This commit is contained in:
parent
c38579dc22
commit
9e9051229e
@ -250,6 +250,10 @@ class LiteLLMProvider(LLMProvider):
|
||||
# Apply model-specific overrides (e.g. kimi-k2.5 temperature)
|
||||
self._apply_model_overrides(model, kwargs)
|
||||
|
||||
# Use langsmith to view the conversation
|
||||
if os.getenv("LANGSMITH_API_KEY"):
|
||||
kwargs["callbacks"] = ["langsmith"]
|
||||
|
||||
# Pass api_key directly — more reliable than env vars alone
|
||||
if self.api_key:
|
||||
kwargs["api_key"] = self.api_key
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user