Skip to content

Commit 54e99fe

Browse files
committed
wip
1 parent 08dc0c2 commit 54e99fe

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

sentry_sdk/integrations/cohere.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from sentry_sdk.scope import should_send_default_pii
2222
from sentry_sdk.integrations import DidNotEnable, Integration
2323
from sentry_sdk.utils import capture_internal_exceptions, event_from_exception, reraise
24+
from sentry_sdk.integrations.cohere_v2 import setup_v2
2425

2526
try:
2627
from cohere.client import Client
@@ -79,9 +80,6 @@ def setup_once() -> None:
7980
BaseCohere.chat = _wrap_chat(BaseCohere.chat, streaming=False)
8081
Client.embed = _wrap_embed(Client.embed)
8182
BaseCohere.chat_stream = _wrap_chat(BaseCohere.chat_stream, streaming=True)
82-
83-
from sentry_sdk.integrations.cohere_v2 import setup_v2
84-
8583
setup_v2(_wrap_embed)
8684

8785

@@ -167,18 +165,9 @@ def new_chat(*args: "Any", **kwargs: "Any") -> "Any":
167165
if should_send_default_pii() and integration.include_prompts:
168166
messages = []
169167
for x in kwargs.get("chat_history", []):
170-
<<<<<<< HEAD
171168
messages.append(
172169
{
173170
"role": getattr(x, "role", "").lower(),
174-
=======
175-
role = getattr(x, "role", "").lower()
176-
if role == "chatbot":
177-
role = "assistant"
178-
messages.append(
179-
{
180-
"role": role,
181-
>>>>>>> c51eeb90 (correct model)
182171
"content": getattr(x, "message", ""),
183172
}
184173
)

0 commit comments

Comments
 (0)