提取事件提示词
This commit is contained in:
parent
2ba5d2ad37
commit
638858e2fb
@ -190,7 +190,7 @@ export default async (knex: Knex, forceInit: boolean = false): Promise<void> =>
|
||||
builder: (table) => {
|
||||
table.integer("id").notNullable();
|
||||
table.string("name");
|
||||
table.text("rompt");
|
||||
table.text("prompt");
|
||||
table.primary(["id"]);
|
||||
table.unique(["id"]);
|
||||
},
|
||||
|
||||
34
src/types/database.d.ts
vendored
34
src/types/database.d.ts
vendored
@ -1,34 +1,6 @@
|
||||
// @db-hash dca563f0fd86a5e9e9709d61b322e923
|
||||
// @db-hash d07435d983861c95bb42e6e4742ef1c1
|
||||
//该文件由脚本自动生成,请勿手动修改
|
||||
|
||||
export interface _o_assets_old_20260327 {
|
||||
'assetsId'?: number | null;
|
||||
'describe'?: string | null;
|
||||
'id'?: number;
|
||||
'imageId'?: number | null;
|
||||
'name'?: string | null;
|
||||
'projectId'?: number | null;
|
||||
'prompt'?: string | null;
|
||||
'promptState'?: string | null;
|
||||
'remark'?: string | null;
|
||||
'scriptId'?: number | null;
|
||||
'startTime'?: number | null;
|
||||
'type'?: string | null;
|
||||
}
|
||||
export interface _o_assets_old_20260327_1 {
|
||||
'assetsId'?: number | null;
|
||||
'describe'?: string | null;
|
||||
'id'?: number;
|
||||
'imageId'?: number | null;
|
||||
'name'?: string | null;
|
||||
'projectId'?: number | null;
|
||||
'prompt'?: string | null;
|
||||
'promptState'?: string | null;
|
||||
'remark'?: string | null;
|
||||
'scriptId'?: number | null;
|
||||
'startTime'?: number | null;
|
||||
'type'?: string | null;
|
||||
}
|
||||
export interface memories {
|
||||
'content': string;
|
||||
'createTime': number;
|
||||
@ -149,7 +121,7 @@ export interface o_project {
|
||||
export interface o_prompt {
|
||||
'id'?: number;
|
||||
'name'?: string | null;
|
||||
'rompt'?: string | null;
|
||||
'prompt'?: string | null;
|
||||
}
|
||||
export interface o_script {
|
||||
'content'?: string | null;
|
||||
@ -255,8 +227,6 @@ export interface o_videoConfig {
|
||||
}
|
||||
|
||||
export interface DB {
|
||||
"_o_assets_old_20260327": _o_assets_old_20260327;
|
||||
"_o_assets_old_20260327_1": _o_assets_old_20260327_1;
|
||||
"memories": memories;
|
||||
"o_agentDeploy": o_agentDeploy;
|
||||
"o_agentWorkData": o_agentWorkData;
|
||||
|
||||
@ -27,8 +27,9 @@ class CleanNovel {
|
||||
private async processChapter(novel: o_novel, intansce: ReturnType<typeof u.Ai.Text>): Promise<EventType | null> {
|
||||
try {
|
||||
const prompt = await u.getPrompts("event");
|
||||
const data = await u.db("o_prompt").where("name", "eventExtraction").first("prompt");
|
||||
const resData = await intansce.invoke({
|
||||
system: prompt,
|
||||
system: data ? JSON.stringify(data.prompt) : (prompt as string),
|
||||
messages: [
|
||||
{
|
||||
role: "user",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user