Request to a remote server with ssh connection

Viewed 14

I'd been working with some kind of API on the remote server, so the connection was established through url:

import requests

BASE_URL = "***"

def vectorize_token(token, model_name):
    response = requests.get(
        f"{BASE_URL}/vectorize_token", params={"token": token, "model_name": model_name}
    )
    data = response.json()
    return data['vector']

Then it changed to a SSH connection, so I have host, port, user and password, but I don't know how to interact with API as well as previously. Can you please hint me how to do it?

0 Answers
Related