Closed devpulse01 closed 4 months ago
Hi @devpulse01.
I have updated the interceptor code for OpenAI Assistants and published it to version 9.0.119
of deep-chat-dev
and deep-chat-react-dev
packages. Can you let me know if that works for you.
Thanks!
Hi, Thank you for the quick update :) However, my current issue is related to the OpenAI Chat API.
Oh, my bad, I'll see what I can change there.
I've made the change in version 9.0.121
. Let me know if this works for you.
The onResponse event is now triggered.
However, it contains only the text message:
{
"text": "The current temperature in New York, NY is 5°C."
}
Would it be possible to receive the entire response object, similar to other types of responses?
{
"id": "chatcmpl.",
"object": "chat.completion",
"created": 1706806717,
"model": "gpt-4-0125-preview",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "The current temperature in New York, NY is 5°C."
},
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 62,
"completion_tokens": 13,
"total_tokens": 75
},
"system_fingerprint": "fp_123456789"
}
Thank you.
That makes sense, I made this change in 9.0.122
.
Everything is working perfectly. Thank you so much!
Glad to hear it works! I'll include this code in the next release. Thanks!
This has now been deployed in Deep Chat version 1.4.11
. See the release notes for more.
Hey Ovidijus, I've been trying to implement the response interceptor ( as described on https://deepchat.dev/docs/interceptors#responseInterceptor ).
Everything works well without tools, but when I add a tool, the interceptor doesn't trigger for the OpenAI response anymore.
For example, in my case, the interceptor is triggered for the tool call:
Then, I return a result formatted like this:
However, I'm not able to retrieve the follow-up reply because the interceptor is not triggered.
Am I missing something, or is this behavior expected? Thank you for your assistance. Best