mirror of
https://github.com/open-webui/open-webui
synced 2024-11-16 05:24:02 +00:00
Merge pull request #576 from ollama-webui/rag-fix
fix: openai compatible api rag issue
This commit is contained in:
commit
af34b1010e
@ -519,7 +519,7 @@
|
|||||||
.filter((message) => message)
|
.filter((message) => message)
|
||||||
.map((message, idx, arr) => ({
|
.map((message, idx, arr) => ({
|
||||||
role: message.role,
|
role: message.role,
|
||||||
...(message.files.filter((file) => file.type === 'image')
|
...(message.files?.filter((file) => file.type === 'image').length > 0 ?? false
|
||||||
? {
|
? {
|
||||||
content: [
|
content: [
|
||||||
{
|
{
|
||||||
|
@ -530,7 +530,7 @@
|
|||||||
.filter((message) => message)
|
.filter((message) => message)
|
||||||
.map((message, idx, arr) => ({
|
.map((message, idx, arr) => ({
|
||||||
role: message.role,
|
role: message.role,
|
||||||
...(message.files.filter((file) => file.type === 'image')
|
...(message.files?.filter((file) => file.type === 'image').length > 0 ?? false
|
||||||
? {
|
? {
|
||||||
content: [
|
content: [
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user