Added "custom_prompt_post_processing" to custom-request (#4639)
Signed| @@ -49,6 +49,7 @@ import EventSourceStream from './sse-stream.js'; | ||
| 49 | 49 | * @property {string} [custom_url] - Optional custom URL |
| 50 | 50 | * @property {string} [reverse_proxy] - Optional reverse proxy URL |
| 51 | 51 | * @property {string} [proxy_password] - Optional proxy password |
| 52 | + * @property {string} [custom_prompt_post_processing] - Optional custom prompt post-processing | |
| 52 | 53 | */ |
| 53 | 54 | |
| 54 | 55 | /** @typedef {Record<string, any> & ChatCompletionPayloadBase} ChatCompletionPayload */ |
| @@ -414,7 +415,7 @@ export class ChatCompletionService { | ||
| 414 | 415 | * @param {ChatCompletionPayload} custom |
| 415 | 416 | * @returns {ChatCompletionPayload} |
| 416 | 417 | */ |
| 417 | 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 | 419 | const payload = { |
| 419 | 420 | stream, |
| 420 | 421 | messages, |
| @@ -425,6 +426,7 @@ export class ChatCompletionService { | ||
| 425 | 426 | custom_url, |
| 426 | 427 | reverse_proxy, |
| 427 | 428 | proxy_password, |
| 429 | + custom_prompt_post_processing, | |
| 428 | 430 | use_makersuite_sysprompt: true, |
| 429 | 431 | claude_use_sysprompt: true, |
| 430 | 432 | ...props, |
| @@ -167,6 +167,7 @@ const profilesProvider = () => [ | ||
| 167 | 167 | * @property {string} [stop-strings] Custom Stopping Strings |
| 168 | 168 | * @property {string} [start-reply-with] Start Reply With |
| 169 | 169 | * @property {string} [reasoning-template] Reasoning Template |
| 170 | + * @property {string} [prompt-post-processing] Prompt Post-Processing | |
| 170 | 171 | * @property {string[]} [exclude] Commands to exclude |
| 171 | 172 | */ |
| 172 | 173 | |
| @@ -410,6 +410,7 @@ export class ConnectionManagerRequestService { | ||
| 410 | 410 | custom_url: profile['api-url'], |
| 411 | 411 | reverse_proxy: proxyPreset?.url, |
| 412 | 412 | proxy_password: proxyPreset?.password, |
| 413 | + custom_prompt_post_processing: profile['prompt-post-processing'], | |
| 413 | 414 | ...overridePayload, |
| 414 | 415 | }, { |
| 415 | 416 | presetName: includePreset ? profile.preset : undefined, |