File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -162,14 +162,23 @@ def new_chat(*args: "Any", **kwargs: "Any") -> "Any":
162162 set_data_normalized (span , SPANDATA .GEN_AI_SYSTEM , "cohere" )
163163 set_data_normalized (span , SPANDATA .GEN_AI_OPERATION_NAME , "chat" )
164164 if model :
165- set_data_normalized (span , SPANDATA .GEN_AI_RESPONSE_MODEL , model )
165+ set_data_normalized (span , SPANDATA .GEN_AI_REQUEST_MODEL , model )
166166
167167 if should_send_default_pii () and integration .include_prompts :
168168 messages = []
169169 for x in kwargs .get ("chat_history" , []):
170+ < << << << HEAD
170171 messages .append (
171172 {
172173 "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 )
173182 "content" : getattr (x , "message" , "" ),
174183 }
175184 )
Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ def new_chat(*args, **kwargs):
185185 set_data_normalized (span , SPANDATA .GEN_AI_SYSTEM , "cohere" )
186186 set_data_normalized (span , SPANDATA .GEN_AI_OPERATION_NAME , "chat" )
187187 if model :
188- set_data_normalized (span , SPANDATA .GEN_AI_RESPONSE_MODEL , model )
188+ set_data_normalized (span , SPANDATA .GEN_AI_REQUEST_MODEL , model )
189189
190190 if should_send_default_pii () and integration .include_prompts :
191191 messages = _extract_messages_v2 (kwargs .get ("messages" , []))
You can’t perform that action at this time.
0 commit comments