-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Webui: Enable communication with parent html (if webui is in iframe): #11940
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
3645e1b
42eb6c4
cd32872
1920cc9
e7ec817
4bbd48d
8ddb353
96e2d46
ff378aa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -21,6 +21,7 @@ const dispatchConversationChange = (convId: string) => { | |||||
| const db = new Dexie('LlamacppWebui') as Dexie & { | ||||||
| conversations: Table<Conversation>; | ||||||
| messages: Table<Message>; | ||||||
| extraContext: string; | ||||||
|
||||||
| }; | ||||||
|
|
||||||
| // https://dexie.org/docs/Version/Version.stores() | ||||||
|
|
@@ -116,6 +117,12 @@ const StorageUtils = { | |||||
| }); | ||||||
| return conv; | ||||||
| }, | ||||||
| async setExtraContext(extraContext: string): Promise<void> { | ||||||
| db.extraContext = extraContext | ||||||
| }, | ||||||
| async getExtraContext(): Promise<string> { | ||||||
|
||||||
| async getExtraContext(): Promise<string> { | |
| async getExtraContext(): Promise<string | undefined> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As extraContext will be moved in app.context, this function will be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may not be a good idea. Some models ignore system prompt. It should be injected into user message instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this puts the extra context message as a user message just before the other user messages. Is there something wrong?