From 2eed63f014deae539b22360c44c40e9ab2fef9a0 Mon Sep 17 00:00:00 2001 From: sigoden Date: Sat, 27 Jul 2024 17:14:19 +0800 Subject: feat: change model patch structure (#754) --- config.example.yaml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'config.example.yaml') diff --git a/config.example.yaml b/config.example.yaml index 9e51c13..96b001c 100644 --- a/config.example.yaml +++ b/config.example.yaml @@ -95,9 +95,10 @@ clients: # - name: xxxx # Reranker model # type: reranker # max_input_tokens: 2048 - # patches: - # : # The regex to match model names, e.g. '.*' 'gpt-4o' 'gpt-4o|gpt-4-.*' - # chat_completions_body: # The JSON to be merged with the chat completions request body. + # patch: # Patch api request + # chat_completions_body: + # : # The regex to match model names, e.g. '.*' 'gpt-4o' 'gpt-4o|gpt-4-.*' + # # The JSON to be merged with the chat completions request body. # extra: # proxy: socks5://127.0.0.1:1080 # Set https/socks5 proxy. ENV: HTTPS_PROXY/https_proxy/ALL_PROXY/all_proxy # connect_timeout: 10 # Set timeout in seconds for connect to api @@ -121,9 +122,9 @@ clients: # See https://ai.google.dev/docs - type: gemini api_key: xxx # ENV: {client}_API_KEY - patches: - '.*': - chat_completions_body: + patch: + chat_completions_body: + '.*': safetySettings: - category: HARM_CATEGORY_HARASSMENT threshold: BLOCK_NONE @@ -187,9 +188,9 @@ clients: # Run `gcloud auth application-default login` to init the adc file # see https://cloud.google.com/docs/authentication/external/set-up-adc adc_file: - patches: - 'gemini-.*': - chat_completions_body: + patch: + chat_completions_body: + 'gemini-.*': safetySettings: - category: HARM_CATEGORY_HARASSMENT threshold: BLOCK_ONLY_HIGH -- cgit v1.2.3