import openai

Configura tu clave de API de OpenAI

openai.api_key = 'tu_clave_de_api'

Ejemplo de solicitud a la API de ChatGPT

response = openai.Completion.create( engine="text-davinci-003", # Puedes elegir otros motores disponibles prompt="Escribe aquí tu mensaje de entrada.", max_tokens=150 # Puedes ajustar este parámetro según tus necesidades )

Obtiene la respuesta generada por ChatGPT

generated_text = response['choices'][0]['text'] print(generated_text)

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API: The model has no library tag.