-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(kb): Migrations of chats and personas to support KB
- Loading branch information
1 parent
4648215
commit 167f7b9
Showing
15 changed files
with
80 additions
and
34 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,5 @@ | ||
import { Chat, ChatMigration } from 'src/types/chats'; | ||
|
||
export const chat_4_add_knowledge_bases: ChatMigration = (currentChat: Chat) => { | ||
return { ...currentChat, knowledgeBases: [] }; | ||
}; |
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,12 @@ | ||
import { ChatMigration } from 'src/types/chats'; | ||
import { chat_1_add_message_author } from 'src/migrations/chats/chat_1_add_message_author'; | ||
import { chat_2_add_persona_role_and_ipfs_avatar } from 'src/migrations/chats/chat_2_add_persona_role_and_ipfs_avatar'; | ||
import { chat_3_add_model_id } from 'src/migrations/chats/chat_3_add_model_id'; | ||
import { chat_4_add_knowledge_bases } from 'src/migrations/chats/chat_4_add_knowledge_bases'; | ||
|
||
export const chatsMigrations: ChatMigration[] = [ | ||
chat_1_add_message_author, | ||
chat_2_add_persona_role_and_ipfs_avatar, | ||
chat_3_add_model_id, | ||
chat_4_add_knowledge_bases, | ||
]; |
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,4 @@ | ||
import { PersonaMigration } from 'src/types/personas'; | ||
import { persona_1_add_knowledge_bases } from 'src/migrations/personas/persona_1_add_knowledge_bases'; | ||
|
||
export const personasMigrations: PersonaMigration[] = [persona_1_add_knowledge_bases]; |
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,5 @@ | ||
import { PersonaMigration, UIPersona } from 'src/types/personas'; | ||
|
||
export const persona_1_add_knowledge_bases: PersonaMigration = (currentPersona: UIPersona) => { | ||
return { ...currentPersona, knowledgeBases: [] }; | ||
}; |
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
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 was deleted.
Oops, something went wrong.
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