user: Write me a py script that sends a post to https://kairo-api.kys.gay/api/gpt with payload:  prompt: msg,         model: selectedModel,         cvid: id,         web: (true or false), make it so it asks the user if they want to enabel web after every input, also cvid should be from the json the (conversation_id), also the ai response is "message"
assistant: Certainly! Below is a Python script that accomplishes what you've described. Make sure that you have the necessary Python environment and dependencies installed, such as `requests`.

```python
import json
import requests

def send_post_request(prompt, model, cvid, web):
    url = "https://kairo-api.kys.gay/api/gpt"
    payload = {
        "prompt": prompt,
        "model": model,
        "cvid": cvid,
        "web": web
    }
    headers = {
        "Content-Type": "application/json"
    }
    
    response = requests.post(url, headers=headers, data=json.dumps(payload))
    
    if response.status_code == 200:
        return response.json().get("message", "No message key found in the response.")
    else:
        return f"Error: {response.status_code} - {response.text}"

def main():
    while True:
        # User inputs
        msg = input("Enter your prompt: ")
        selected_model = input("Enter the model name: ")
        
        # Read conversation_id from a local JSON file or any source you may have
        # Example JSON structure: {"conversation_id": "some_unique_id"}
        with open('conversation_id.json', 'r') as file:
            conversation_data = json.load(file)
        
        cvid = conversation_data.get("conversation_id")
        if not cvid:
            print("No conversation_id found in JSON.")
            continue
        
        # Ask the user if they want to enable web
        web_input = input("Do you want to enable web? (yes/no): ").strip().lower()
        web = web_input == 'yes'
        
        # Send POST request
        ai_response = send_post_request(msg, selected_model, cvid, web)
        print("AI Response:", ai_response)
        
        # Continue or exit
        cont = input("Do you want to send another message? (yes/no): ").strip().lower()
        if cont != 'yes':
            break

if __name__ == '__main__':
    main()
```

### Running the Script
1. **Dependencies**: Make sure you have `requests` installed. You can install it using pip:
   ```bash
   pip install requests
   ```
2. **Setup**: Ensure the `conversation_id.json` exists and contains a valid JSON structure, for example:
   ```json
   {
       "conversation_id": "12345"
   }
   ```
3. **Execution**: Run the script in your Python environment.

This script will continuously prompt the user for inputs, send them to the specified API, and display the AI's response until the user decides to quit.
user: make it use httpx
PROMPT: user: Write me a py script that sends a post to https://kairo-api.kys.gay/api/gpt with payload:  prompt: msg,         model: selectedModel,         cvid: id,         web: (true or false), make it so it asks the user if they want to enabel web after every input, also cvid should be from the json the (conversation_id), also the ai response is "message"
assistant: Certainly! Below is a Python script that accomplishes what you've described. Make sure that you have the necessary Python environment and dependencies installed, such as `requests`.

```python
import json
import requests

def send_post_request(prompt, model, cvid, web):
    url = "https://kairo-api.kys.gay/api/gpt"
    payload = {
        "prompt": prompt,
        "model": model,
        "cvid": cvid,
        "web": web
    }
    headers = {
        "Content-Type": "application/json"
    }
    
    response = requests.post(url, headers=headers, data=json.dumps(payload))
    
    if response.status_code == 200:
        return response.json().get("message", "No message key found in the response.")
    else:
        return f"Error: {response.status_code} - {response.text}"

def main():
    while True:
        # User inputs
        msg = input("Enter your prompt: ")
        selected_model = input("Enter the model name: ")
        
        # Read conversation_id from a local JSON file or any source you may have
        # Example JSON structure: {"conversation_id": "some_unique_id"}
        with open('conversation_id.json', 'r') as file:
            conversation_data = json.load(file)
        
        cvid = conversation_data.get("conversation_id")
        if not cvid:
            print("No conversation_id found in JSON.")
            continue
        
        # Ask the user if they want to enable web
        web_input = input("Do you want to enable web? (yes/no): ").strip().lower()
        web = web_input == 'yes'
        
        # Send POST request
        ai_response = send_post_request(msg, selected_model, cvid, web)
        print("AI Response:", ai_response)
        
        # Continue or exit
        cont = input("Do you want to send another message? (yes/no): ").strip().lower()
        if cont != 'yes':
            break

if __name__ == '__main__':
    main()
```

### Running the Script
1. **Dependencies**: Make sure you have `requests` installed. You can install it using pip:
   ```bash
   pip install requests
   ```
2. **Setup**: Ensure the `conversation_id.json` exists and contains a valid JSON structure, for example:
   ```json
   {
       "conversation_id": "12345"
   }
   ```
3. **Execution**: Run the script in your Python environment.

This script will continuously prompt the user for inputs, send them to the specified API, and display the AI's response until the user decides to quit.
user: make it use httpx