from huggingface_hub import InferenceClient client = InferenceClient(api_key="hf_Тут токен") s = input() for message in client.chat_completion( model="microsoft/Phi-3-mini-4k-instruct", messages=[ {"role": "user", "content": s } ] max_tokens=500, stream=True, ): print(message.choices[0].delta.content, end="")