Fix image display issue (#40)
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"type": "patch",
|
||||
"comment": "fix image display issue for vision model",
|
||||
"packageName": "@acedatacloud/hub",
|
||||
"email": "cqc@cuiqingcai.com",
|
||||
"dependentChangeType": "patch"
|
||||
}
|
||||
@@ -11,7 +11,7 @@
|
||||
<markdown-renderer v-if="!Array.isArray(message.content)" :content="message?.content" />
|
||||
<div v-else>
|
||||
<div v-for="(item, index) in message.content" :key="index">
|
||||
<img v-if="item.type === 'image_url'" :src="item.image_url" fit="cover" class="image" />
|
||||
<img v-if="item.type === 'image_url'" :src="item.image_url?.url" fit="cover" class="image" />
|
||||
<markdown-renderer v-if="item.type === 'text'" :key="index" :content="item.text" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ export enum IChatMessageState {
|
||||
export interface IChatMessageContentItem {
|
||||
type: string;
|
||||
text?: string;
|
||||
image_url?: string;
|
||||
image_url?: { url: string };
|
||||
}
|
||||
|
||||
export interface IChatMessage {
|
||||
|
||||
Reference in New Issue
Block a user