1123Javayanglei/vscode-chat-proxy/config does not have a README file

    ConfigError

    pub(all) suberror ConfigError {
    ConfigError(String)
    }

    Config

    pub(all) struct Config {
    listen_host : String
    listen_port : Int
    upstream_host : String
    upstream_port : Int
    forward : Bool
    web_enabled : Bool
    web_host : String
    web_port : Int
    system_prompt : String
    intercept : Bool
    }

    config_from_env

    fn config_from_env() -> Config

    Build the base config from environment variables (call after load_env).

    Individual variables: HOST, PORT, UPSTREAM_HOST, UPSTREAM_PORT, WEB_HOST, WEB_PORT, and SYSTEM_PROMPT (the sentence forced to open the system message). Combined host:port variables VSCODE_CHAT_PROXY_LISTEN / VSCODE_CHAT_PROXY_UPSTREAM take precedence over the individual ones.

    default_config

    fn default_config() -> Config

    default_system_prompt

    let default_system_prompt : String

    The sentence forced to be the first sentence of the Chat Completions system message unless overridden by SYSTEM_PROMPT / --system-prompt.

    parse_address

    fn parse_address(s : String) -> Result[(String, Int), String]

    Public wrapper of split_host_port for environment variable handling.

    parse_config

    fn parse_config(args : Array[String], base : Config) -> Result[Config, String]

    Parse CLI arguments (as returned by @env.args(), i.e. including the program name at index 0) on top of a base config.

    wants_help

    fn wants_help(args : Array[String]) -> Bool

    Whether the user asked for help.

    Source Files