remove unused promptPreamble functionality
This commit is contained in:
parent
fb5beb042e
commit
a2e1f5aab4
2 changed files with 3 additions and 20 deletions
|
|
@ -27,15 +27,11 @@ export const gatherContext = createAsyncThunk<
|
|||
{
|
||||
editorState: JSONContent;
|
||||
modifiers: InputModifiers;
|
||||
promptPreamble?: string;
|
||||
},
|
||||
ThunkApiType
|
||||
>(
|
||||
"chat/gatherContext",
|
||||
async (
|
||||
{ modifiers, editorState, promptPreamble },
|
||||
{ dispatch, extra, getState },
|
||||
) => {
|
||||
async ({ modifiers, editorState }, { dispatch, extra, getState }) => {
|
||||
const state = getState();
|
||||
const selectedChatModel = selectSelectedChatModel(state);
|
||||
|
||||
|
|
@ -50,7 +46,7 @@ export const gatherContext = createAsyncThunk<
|
|||
}
|
||||
|
||||
// Resolve context providers and construct new history
|
||||
let {
|
||||
const {
|
||||
selectedContextItems,
|
||||
selectedCode,
|
||||
content,
|
||||
|
|
@ -110,14 +106,6 @@ export const gatherContext = createAsyncThunk<
|
|||
}
|
||||
}
|
||||
|
||||
if (promptPreamble) {
|
||||
if (typeof content === "string") {
|
||||
content = promptPreamble + content;
|
||||
} else if (content[0].type === "text") {
|
||||
content[0].text = promptPreamble + content[0].text;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
selectedContextItems,
|
||||
selectedCode,
|
||||
|
|
|
|||
|
|
@ -25,15 +25,11 @@ export const streamResponseThunk = createAsyncThunk<
|
|||
editorState: JSONContent;
|
||||
modifiers: InputModifiers;
|
||||
index?: number;
|
||||
promptPreamble?: string;
|
||||
},
|
||||
ThunkApiType
|
||||
>(
|
||||
"chat/streamResponse",
|
||||
async (
|
||||
{ editorState, modifiers, index, promptPreamble },
|
||||
{ dispatch, extra, getState },
|
||||
) => {
|
||||
async ({ editorState, modifiers, index }, { dispatch, extra, getState }) => {
|
||||
await dispatch(
|
||||
streamThunkWrapper(async () => {
|
||||
const state = getState();
|
||||
|
|
@ -53,7 +49,6 @@ export const streamResponseThunk = createAsyncThunk<
|
|||
gatherContext({
|
||||
editorState,
|
||||
modifiers,
|
||||
promptPreamble,
|
||||
}),
|
||||
);
|
||||
const {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue