Hello! I have own fine tuned the model (russian language) for generate text.
When I use:
API_URL = "https://api-inference.huggingface.co/models/avorozhko/ruDialoGpt3-medium-finetuned-context"
headers = {"Authorization": "Bearer ****"}

def query(payload):
    data = json.dumps(payload, ensure_ascii=False).encode('utf8')
    print(data)
    print(data.decode("utf-8"))
    response = requests.request("POST", API_URL, headers=headers, data=data)
    return json.loads(response.content.decode("utf-8"))

payload = {
       "inputs": "|0|1|Привет, как твои дела?</s>",
       "parameters": {
          "num_return_sequences": 1,
          "min_length": 2,
          "max_length": 500,
          "no_repeat_ngram_size": 3,
          "do_sample": True,
          "top_k": 50,
          "top_p": 0.9,
          "temperature": 0.6,
          "mask_token_id": 4,
          "eos_token_id": 2,
          "unk_token_id": 3,
          "pad_token_id": 0
     },
    }

output = query(payload)

The answer is:
[{'generated_text': '|0|1|Привет, как твои дела?</s> character persider Persider pers person characters прищурилсятизмом туловища физиономии pattern settledтизматизмтизinessительностьжесто natureливости�||1'}]

But must be like this:
[{'generated_text': '|0|1|Привет, как твои дела?</s>|1|1|А ты кто?</s>}]

In the Google Colaboratory works fine, here is the example:
  
      

      colab.research.google.com
  

  
    

Google Colaboratory