Closed guinanlin closed 8 months ago
The problem here is that you are not using Vue's Composition or Options APIs, hence the inlined object values are not being picked up properly. You will have to move inputAreaStyle
, request
, requestInterceptor
and responseInterceptor
object values to const
values in the script
. Example:
:responseInterceptor ="responseInterceptor"
In script:
const responseInterceptor = (response) => {
// const responseText = // extract it from the response argument
return { text: response.choices[0].message.content };
}
Let me know if this helps. Thanks!
"responseInterceptor"
Yeah, tks a lot, it works now :-)
That is good to hear!
This behavior is quite strange.
You can take a look at the following code. The code segment below runs without any issues:
By selecting a city, you can obtain the desired city within deep-chat.
https://stackblitz.com/edit/rmazpd-wsvrsr?file=src%2FApp.vue
However, there is an issue when running the following code. The fundamental difference is that the "deep-chat" below uses a request call. This causes "deep-chat" to refresh when the listbox changes.
https://stackblitz.com/edit/rmazpd-promzf?file=src%2FApp.vue