Added "custom_prompt_post_processing" to custom-request (#4639)

d48a3639edd05e71d9fcb53b08e7343b12f27f81

bmen25124 <bmen25124@gmail.com>

Signed
3 files changed, +5 -1Ignore whitespace
public/scripts/custom-request.js+3 -1
@@ -49,6 +49,7 @@ import EventSourceStream from './sse-stream.js';
49 * @property {string} [custom_url] - Optional custom URL49 * @property {string} [custom_url] - Optional custom URL
50 * @property {string} [reverse_proxy] - Optional reverse proxy URL50 * @property {string} [reverse_proxy] - Optional reverse proxy URL
51 * @property {string} [proxy_password] - Optional proxy password51 * @property {string} [proxy_password] - Optional proxy password
52 * @property {string} [custom_prompt_post_processing] - Optional custom prompt post-processing
52 */53 */
5354
54/** @typedef {Record<string, any> & ChatCompletionPayloadBase} ChatCompletionPayload */55/** @typedef {Record<string, any> & ChatCompletionPayloadBase} ChatCompletionPayload */
@@ -414,7 +415,7 @@ export class ChatCompletionService {
414 * @param {ChatCompletionPayload} custom415 * @param {ChatCompletionPayload} custom
415 * @returns {ChatCompletionPayload}416 * @returns {ChatCompletionPayload}
416 */417 */
417 static createRequestData({ stream = false, messages, model, chat_completion_source, max_tokens, temperature, custom_url, reverse_proxy, proxy_password, ...props }) {418 static createRequestData({ stream = false, messages, model, chat_completion_source, max_tokens, temperature, custom_url, reverse_proxy, proxy_password, custom_prompt_post_processing, ...props }) {
418 const payload = {419 const payload = {
419 stream,420 stream,
420 messages,421 messages,
@@ -425,6 +426,7 @@ export class ChatCompletionService {
425 custom_url,426 custom_url,
426 reverse_proxy,427 reverse_proxy,
427 proxy_password,428 proxy_password,
429 custom_prompt_post_processing,
428 use_makersuite_sysprompt: true,430 use_makersuite_sysprompt: true,
429 claude_use_sysprompt: true,431 claude_use_sysprompt: true,
430 ...props,432 ...props,
public/scripts/extensions/connection-manager/index.js+1 -0
@@ -167,6 +167,7 @@ const profilesProvider = () => [
167 * @property {string} [stop-strings] Custom Stopping Strings167 * @property {string} [stop-strings] Custom Stopping Strings
168 * @property {string} [start-reply-with] Start Reply With168 * @property {string} [start-reply-with] Start Reply With
169 * @property {string} [reasoning-template] Reasoning Template169 * @property {string} [reasoning-template] Reasoning Template
170 * @property {string} [prompt-post-processing] Prompt Post-Processing
170 * @property {string[]} [exclude] Commands to exclude171 * @property {string[]} [exclude] Commands to exclude
171 */172 */
172173
public/scripts/extensions/shared.js+1 -0
@@ -410,6 +410,7 @@ export class ConnectionManagerRequestService {
410 custom_url: profile['api-url'],410 custom_url: profile['api-url'],
411 reverse_proxy: proxyPreset?.url,411 reverse_proxy: proxyPreset?.url,
412 proxy_password: proxyPreset?.password,412 proxy_password: proxyPreset?.password,
413 custom_prompt_post_processing: profile['prompt-post-processing'],
413 ...overridePayload,414 ...overridePayload,
414 }, {415 }, {
415 presetName: includePreset ? profile.preset : undefined,416 presetName: includePreset ? profile.preset : undefined,