mirror of
https://github.com/toeverything/AFFiNE.git
synced 2025-01-03 21:12:22 +03:00
fix(core): should choose different models based on content or attachments (#6567)
This commit is contained in:
parent
4b24722f3d
commit
b2ca8249c1
@ -1,6 +1,7 @@
|
||||
import { assertExists } from '@blocksuite/global/utils';
|
||||
import { AIProvider } from '@blocksuite/presets';
|
||||
|
||||
import type { PromptKey } from './prompt';
|
||||
import {
|
||||
createChatSession,
|
||||
listHistories,
|
||||
@ -250,8 +251,12 @@ export function setupAIProvider() {
|
||||
});
|
||||
|
||||
AIProvider.provide('createImage', options => {
|
||||
// const promptName = 'debug:action:fal-sd15';
|
||||
const promptName = 'debug:action:dalle3';
|
||||
// test to image
|
||||
let promptName: PromptKey = 'debug:action:dalle3';
|
||||
// image to image
|
||||
if (options.attachments?.length) {
|
||||
promptName = 'debug:action:fal-sd15';
|
||||
}
|
||||
return toImage({
|
||||
...options,
|
||||
promptName,
|
||||
|
Loading…
Reference in New Issue
Block a user