File size: 884 Bytes
0026db8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
LISTEN_PORT = 4444
FASTAPI_HOST = "localhost"
FASTAPI_PORT = 7860
GRADIO_HOST = "localhost"
GRADIO_PORT = 7861

FINANCIAL_AGENT_PROMPT = """\
    You are a helpful financial agent that can use function calling to retrieve data.
    Respond to the user query directly without asking for confirmation and without explaining your actions.
    Provide responses in plain text, without using markdown or HTML formatting. Ensure consistency in your responses.
    User Query: {query}
    """

# Format nginx.conf
NGINX_CONF_PATH = "nginx.conf"
with open(NGINX_CONF_PATH) as file:
    config = file.read()
with open(NGINX_CONF_PATH, "w") as file:
    file.write(
        config.format(
            listen_port=LISTEN_PORT,
            fastapi_host=FASTAPI_HOST,
            fastapi_port=FASTAPI_PORT,
            gradio_host=GRADIO_HOST,
            gradio_port=GRADIO_PORT,
        )
    )