-
-
Notifications
You must be signed in to change notification settings - Fork 17.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/Custom Assistant Builder (#3631)
* add custom assistant builder * add tools to custom assistant * add save assistant button
- Loading branch information
1 parent
e020452
commit fe2ed26
Showing
46 changed files
with
3,129 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
packages/server/src/database/migrations/mariadb/1733011290987-AddTypeToAssistant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { MigrationInterface, QueryRunner } from 'typeorm' | ||
|
||
export class AddTypeToAssistant1733011290987 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
const columnExists = await queryRunner.hasColumn('assistant', 'type') | ||
if (!columnExists) { | ||
await queryRunner.query(`ALTER TABLE \`assistant\` ADD COLUMN \`type\` TEXT;`) | ||
await queryRunner.query(`UPDATE \`assistant\` SET \`type\` = 'OPENAI';`) | ||
} | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`ALTER TABLE \`assistant\` DROP COLUMN \`type\`;`) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
packages/server/src/database/migrations/mysql/1733011290987-AddTypeToAssistant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { MigrationInterface, QueryRunner } from 'typeorm' | ||
|
||
export class AddTypeToAssistant1733011290987 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
const columnExists = await queryRunner.hasColumn('assistant', 'type') | ||
if (!columnExists) { | ||
await queryRunner.query(`ALTER TABLE \`assistant\` ADD COLUMN \`type\` TEXT;`) | ||
await queryRunner.query(`UPDATE \`assistant\` SET \`type\` = 'OPENAI';`) | ||
} | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`ALTER TABLE \`assistant\` DROP COLUMN \`type\`;`) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
packages/server/src/database/migrations/postgres/1733011290987-AddTypeToAssistant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { MigrationInterface, QueryRunner } from 'typeorm' | ||
|
||
export class AddTypeToAssistant1733011290987 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
const columnExists = await queryRunner.hasColumn('assistant', 'type') | ||
if (!columnExists) { | ||
await queryRunner.query(`ALTER TABLE "assistant" ADD COLUMN "type" TEXT;`) | ||
await queryRunner.query(`UPDATE "assistant" SET "type" = 'OPENAI';`) | ||
} | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`ALTER TABLE "assistant" DROP COLUMN "type";`) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
packages/server/src/database/migrations/sqlite/1733011290987-AddTypeToAssistant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { MigrationInterface, QueryRunner } from 'typeorm' | ||
|
||
export class AddTypeToAssistant1733011290987 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
const columnExists = await queryRunner.hasColumn('assistant', 'type') | ||
if (!columnExists) { | ||
await queryRunner.query(`ALTER TABLE "assistant" ADD COLUMN "type" TEXT;`) | ||
await queryRunner.query(`UPDATE "assistant" SET "type" = 'OPENAI';`) | ||
} | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`ALTER TABLE "assistant" DROP COLUMN "type";`) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.