diff --git a/python-chatgpt/README.md b/python-chatgpt/README.md new file mode 100644 index 0000000..c85dba5 --- /dev/null +++ b/python-chatgpt/README.md @@ -0,0 +1,122 @@ +# APUNTES PYTHON Y CHATGPT + +## Índice + +## TEMA 1 - Introducción a ChatGPT y sus aplicaciones +### 1.1. - ¿Qué es ChatGPT? + +ChatGPT es un modelo de lenguaje desarrollado por OpenAI, basado en la arquitectura GPT-3.5. GPT significa Generatice Pre-trained Tranformer (Transformador Generativo Pre-enternado). Es un sistema de procesamiento del lenguaje natural (NLP) capaz de generar respuestas coherentes y contextualmente relevantes a partir de las entradas de texto que recibe. Utiliza el aprendizaje automático y está entrenado en una amplia variedad de datos textuales para comprender y generar texto en lenguaje natural. + +### 1.2. - ¿Cómo funciona? + +El funcionamiento de ChatGPT se basa en un enfoque llamado "aprendizaje automático" o "aprendizaje profundo". El modelo GPT-3.5, en el que se basa ChatGPT, es una red neuronal profunda que ha sido entrenada en una enorme cantidad de datos textuales para aprender patrones y características del lenguaje humano. + +Cuando se le proporciona una entrada de texto, como una pregunta o una declaración, ChatGPT descompone el texto en unidades más pequeñas, como palabras o tokens. Luego, analiza el contexto de las palabras y utiliza esa información para generar una respuesta relevante. El modelo se entrena para predecir la siguiente palabra o el siguiente token en una secuencia de texto, dada la secuencia anterior. + +ChatGPT tiene una estructura en capas. Cada capa procesa y extrae información del texto de entrada de manera gradual y compleja. A medida que la información se mueve a través de las capas, se capturan representaciones cada vez más abstractas y significativas del texto. + +Es importante tener en cuenta que ChatGPT se basa en la información con la que ha sido entrenado y no tiene conocimiento directo del mundo real fuera de los datos que se le han proporcionado durante su entrenamiento. Además, aunque ChatGPT puede generar respuestas coherentes y contextuales, también es posible que ocasionalmente genere respuestas incorrectas o no adecuadas, por lo que siempre se debe usar con cautela y verificar la información en caso de duda. + +### 1.3. - Arquitectura + +La arquitectura subyacente de ChatGPT se basa en la versión GPT-3.5 de OpenAI, que es una red neuronal de transformador. Un transformador es un tipo de arquitectura de aprendizaje profundo que ha demostrado excelentes resultados en tareas de procesamiento del lenguaje natural. + +El transformador consta de múltiples capas de atención y alimentación hacia adelante. Cada capa tiene una estructura similar, que incluye una subcapa de atención multi-cabeza y una red de alimentación hacia adelante. + +La subcapa de atención multi-cabeza se encarga de analizar la relación entre las diferentes palabras en la secuencia de entrada. Utiliza múltiples "cabezas de atención" para capturar diferentes aspectos de la dependencia entre palabras. Esto permite que el modelo entienda mejor las relaciones a largo plazo y el contexto en el texto. + +La red de alimentación hacia adelante es una capa de redes neuronales completamente conectadas que procesa las representaciones de salida de la capa de atención. Ayuda a capturar relaciones no lineales en el texto y mejorar la calidad de las representaciones de las palabras. + +En cuanto al funcionamiento, ChatGPT se entrena utilizando un proceso llamado "aprendizaje autodirigido". Durante el entrenamiento, se proporciona al modelo una gran cantidad de datos textuales de diferentes fuentes, como libros, artículos de noticias, páginas web, conversaciones y más. El modelo aprende a predecir la siguiente palabra en una secuencia de texto, dado el contexto anterior. El entrenamiento tiene dos fases: +- Pre-entrenamiento +- Ajuste fino + +[Paper ChatGPT](https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf) + +![](img/python-chatgpt01.png) + +### 1.4. - Casos de uso +- Chatbots y asistentes virtuales. Ejemplo https://my.replika.com/ +- Generación de contenido. Ejemplo https://www.shortlyai.com/ +- Resumen y parafraseo de textos. Ejemplo https://quillbot.com/ +- Análisis de sentimiento. +- Traducción automatica. DeepL utiliza IAs para sus resultados. + +## TEMA 2 - Configuración y Autenticación con la API de OpenAI +### 2.1. - Pasos para autenticarse a ChatGPT + + +- Paso 1 – Registrarse en OpenAI https://platform.openai.com/ +- Paso 2 – Obtener las credenciales API https://platform.openai.com/account/api-keys +- Paso 3 – Almacenarlas de forma segura + +Para guardar las contraseñas de manera segura nos bajamos la librería python-dotenv: +```shell +pip install python-dotenv +``` + +Para guardar la API creamos un fichero .env y ponemos una variable en mayúsculas con la API: +```python +OPENAI_API_KEY=sk-x5ejwlcnwvkcvME_ncjkwceLAcnoewejkINVENTOcnwjl +``` + +Luego, para llamar la api desde cualquier fichero python tenemos que llamar a la API mediante la librería python-dotenv. Ejemplo miPrograma.py: +```python +import os +from dotenv import load_dotenv + +load_dotenv() + +api_key = os.getenv('OPENAI_API_KEY') +``` + +### 2.2. - Instalar y configurar las bibliotecas para OpenAI + +- Paso 1 – Instalar la biblioteca de OpenAI +```pyhton +pip install openai +``` + +- Paso 2 – Importarla y configurar la API key +```python +import openai +``` + +Ahora vamos a configurar la biblioteca openai con la API + +Debajo del código ponemos: +```python +openai.api_key = api_key +``` + +- Paso 3 – Verificar la conexión + +Nos aseguramos de que está configurada la api llamando a los módelos a la biblioteca: +```python +modelos = openai.Model.list() +``` + +Nos devolverá todos los modelos disponibles. Para verlo en consola imprimimos la variable: +```python +print(modelos) +``` + +Ejecutando el programa podemos ver todos los modelos, para aislar los nombres se puede usar el comando jq: +```shell +python3 code/miPrograma.py | jq '.data[].id' +``` + +![](https://vergaracarmona.es/wp-content/uploads/2022/11/json_everywhere-1024x696.jpg) + +## TEMA 3 - Interactuar con ChatGPT usando Python + + + +## TEMA 4 - Aplicaciones Prácticas de Python + ChatGPT + + + +## TEMA 5 - Otras consideraciones para la integración + + + diff --git a/python-chatgpt/code/miPrograma.py b/python-chatgpt/code/miPrograma.py new file mode 100644 index 0000000..cf755c3 --- /dev/null +++ b/python-chatgpt/code/miPrograma.py @@ -0,0 +1,14 @@ +import os +import openai +from dotenv import load_dotenv + +load_dotenv() + +api_key = os.getenv('OPENAI_API_KEY') + +openai.api_key = api_key + +modelos = openai.Model.list() + +print(modelos) + diff --git a/python-chatgpt/code/modelos_openai.json b/python-chatgpt/code/modelos_openai.json new file mode 100644 index 0000000..877ae4d --- /dev/null +++ b/python-chatgpt/code/modelos_openai.json @@ -0,0 +1,1541 @@ +{ + "data": [ + { + "created": 1677532384, + "id": "whisper-1", + "object": "model", + "owned_by": "openai-internal", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1683912666, + "group": null, + "id": "modelperm-KlsZlfft3Gma8pI6A8rTnyjs", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "whisper-1" + }, + { + "created": 1649358449, + "id": "babbage", + "object": "model", + "owned_by": "openai", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1669085501, + "group": null, + "id": "modelperm-49FUp5v084tBB49tC4z8LPH5", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "babbage" + }, + { + "created": 1649359874, + "id": "davinci", + "object": "model", + "owned_by": "openai", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1669066355, + "group": null, + "id": "modelperm-U6ZwlyAd0LyMk4rcMdz33Yc3", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "davinci" + }, + { + "created": 1649809179, + "id": "text-davinci-edit-001", + "object": "model", + "owned_by": "openai", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1679934178, + "group": null, + "id": "modelperm-otmQSS0hmabtVGHI9QB3bct3", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "text-davinci-edit-001" + }, + { + "created": 1669599635, + "id": "text-davinci-003", + "object": "model", + "owned_by": "openai-internal", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1684345476, + "group": null, + "id": "modelperm-y4r1Z53hJ9TJxrUMPM50fYoS", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "text-davinci-003" + }, + { + "created": 1651172509, + "id": "babbage-code-search-code", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1669085863, + "group": null, + "id": "modelperm-4qRnA3Hj8HIJbgo0cGbcmErn", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "babbage-code-search-code" + }, + { + "created": 1651172505, + "id": "text-similarity-babbage-001", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1669081947, + "group": null, + "id": "modelperm-48kcCHhfzvnfY84OtJf5m8Cz", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "text-similarity-babbage-001" + }, + { + "created": 1649880484, + "id": "code-davinci-edit-001", + "object": "model", + "owned_by": "openai", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1679934178, + "group": null, + "id": "modelperm-Foe5Y4TvaKveYxt74oKMw8IB", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "code-davinci-edit-001" + }, + { + "created": 1649364042, + "id": "text-davinci-001", + "object": "model", + "owned_by": "openai", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1669066355, + "group": null, + "id": "modelperm-MVM5NfoRjXkDve3uQW3YZDDt", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "text-davinci-001" + }, + { + "created": 1649357491, + "id": "ada", + "object": "model", + "owned_by": "openai", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1675997661, + "group": null, + "id": "modelperm-u0nKN4ub7EVQudgMuvCuvDjc", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "ada" + }, + { + "created": 1651172509, + "id": "babbage-code-search-text", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1669085863, + "group": null, + "id": "modelperm-Lftf8H4ZPDxNxVs0hHPJBUoe", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "babbage-code-search-text" + }, + { + "created": 1651172505, + "id": "babbage-similarity", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1669081947, + "group": null, + "id": "modelperm-mS20lnPqhebTaFPrcCufyg7m", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "babbage-similarity" + }, + { + "created": 1651172507, + "id": "code-search-babbage-text-001", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1669085863, + "group": null, + "id": "modelperm-EC5ASz4NLChtEV1Cwkmrwm57", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "code-search-babbage-text-001" + }, + { + "created": 1649364043, + "id": "text-curie-001", + "object": "model", + "owned_by": "openai", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1679310997, + "group": null, + "id": "modelperm-8InhPV3CZfN3F5QHKoJd4zRD", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "text-curie-001" + }, + { + "created": 1651172507, + "id": "code-search-babbage-code-001", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1669085864, + "group": null, + "id": "modelperm-64LWHdlANgak2rHzc3K5Stt0", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "code-search-babbage-code-001" + }, + { + "created": 1649364042, + "id": "text-ada-001", + "object": "model", + "owned_by": "openai", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1669088497, + "group": null, + "id": "modelperm-KN5dRBCEW4az6gwcGXkRkMwK", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "text-ada-001" + }, + { + "created": 1671217299, + "id": "text-embedding-ada-002", + "object": "model", + "owned_by": "openai-internal", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1678892857, + "group": null, + "id": "modelperm-Dbv2FOgMdlDjO8py8vEjD5Mi", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "text-embedding-ada-002" + }, + { + "created": 1651172505, + "id": "text-similarity-ada-001", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1669092759, + "group": null, + "id": "modelperm-DdCqkqmORpqxqdg4TkFRAgmw", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "text-similarity-ada-001" + }, + { + "created": 1649364042, + "id": "curie-instruct-beta", + "object": "model", + "owned_by": "openai", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1680267269, + "group": null, + "id": "modelperm-bsg59MlOi88CMf1MjnIKrT5a", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "curie-instruct-beta" + }, + { + "created": 1651172505, + "id": "ada-code-search-code", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1669087421, + "group": null, + "id": "modelperm-wa8tg4Pi9QQNaWdjMTM8dkkx", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "ada-code-search-code" + }, + { + "created": 1651172507, + "id": "ada-similarity", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1669092759, + "group": null, + "id": "modelperm-LtSIwCEReeDcvGTmM13gv6Fg", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "ada-similarity" + }, + { + "created": 1651172507, + "id": "code-search-ada-text-001", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1669087421, + "group": null, + "id": "modelperm-JBssaJSmbgvJfTkX71y71k2J", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "code-search-ada-text-001" + }, + { + "created": 1651172505, + "id": "text-search-ada-query-001", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1669092640, + "group": null, + "id": "modelperm-1YiiBMYC8it0mpQCBK7t8uSP", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "text-search-ada-query-001" + }, + { + "created": 1651172509, + "id": "davinci-search-document", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1669066355, + "group": null, + "id": "modelperm-M43LVJQRGxz6ode34ctLrCaG", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "davinci-search-document" + }, + { + "created": 1651172510, + "id": "ada-code-search-text", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1669087421, + "group": null, + "id": "modelperm-kFc17wOI4d1FjZEaCqnk4Frg", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "ada-code-search-text" + }, + { + "created": 1651172507, + "id": "text-search-ada-doc-001", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1669092640, + "group": null, + "id": "modelperm-kbHvYouDlkD78ehcmMOGdKpK", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "text-search-ada-doc-001" + }, + { + "created": 1649364042, + "id": "davinci-instruct-beta", + "object": "model", + "owned_by": "openai", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1669066356, + "group": null, + "id": "modelperm-k9kuMYlfd9nvFiJV2ug0NWws", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "davinci-instruct-beta" + }, + { + "created": 1651172507, + "id": "text-similarity-curie-001", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1669079883, + "group": null, + "id": "modelperm-6dgTTyXrZE7d53Licw4hYkvd", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "text-similarity-curie-001" + }, + { + "created": 1651172507, + "id": "code-search-ada-code-001", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1669087421, + "group": null, + "id": "modelperm-8soch45iiGvux5Fg1ORjdC4s", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "code-search-ada-code-001" + }, + { + "created": 1651172505, + "id": "ada-search-query", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1669092640, + "group": null, + "id": "modelperm-b753xmIzAUkluQ1L20eDZLtQ", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "ada-search-query" + }, + { + "created": 1651172505, + "id": "text-search-davinci-query-001", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1669066353, + "group": null, + "id": "modelperm-9McKbsEYSaDshU9M3bp6ejUb", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "text-search-davinci-query-001" + }, + { + "created": 1651172509, + "id": "curie-search-query", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1677273417, + "group": null, + "id": "modelperm-sIbfSwzVpVBtymQgOQSLBpxe", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "curie-search-query" + }, + { + "created": 1651172505, + "id": "davinci-search-query", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1669066353, + "group": null, + "id": "modelperm-lYkiTZMmJMWm8jvkPx2duyHE", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "davinci-search-query" + }, + { + "created": 1651172510, + "id": "babbage-search-document", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1669084981, + "group": null, + "id": "modelperm-5qFV9kxCRGKIXpBEP75chmp7", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "babbage-search-document" + }, + { + "created": 1651172507, + "id": "ada-search-document", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1669092640, + "group": null, + "id": "modelperm-8qUMuMAbo4EwedbGamV7e9hq", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "ada-search-document" + }, + { + "created": 1651172509, + "id": "text-search-curie-query-001", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1677273417, + "group": null, + "id": "modelperm-Iion0NCpsXPNtIkQ0owQLi7V", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "text-search-curie-query-001" + }, + { + "created": 1651172509, + "id": "text-search-babbage-doc-001", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1669084981, + "group": null, + "id": "modelperm-ao2r26P2Th7nhRFleHwy2gn5", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "text-search-babbage-doc-001" + }, + { + "created": 1677610602, + "id": "gpt-3.5-turbo", + "object": "model", + "owned_by": "openai", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1685049949, + "group": null, + "id": "modelperm-ewkiEgd5SUVf5uBnw4ljnUaQ", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "gpt-3.5-turbo" + }, + { + "created": 1651172508, + "id": "curie-search-document", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1677273417, + "group": null, + "id": "modelperm-LDsN5wW8eKVuh1OsyciHntE9", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "curie-search-document" + }, + { + "created": 1651172509, + "id": "text-search-curie-doc-001", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1677273417, + "group": null, + "id": "modelperm-taUGRSku7bQLa24SNIwYPEsi", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "text-search-curie-doc-001" + }, + { + "created": 1651172509, + "id": "babbage-search-query", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1669084981, + "group": null, + "id": "modelperm-wSs1hMXDKsrcErlbN8HmzlLE", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "babbage-search-query" + }, + { + "created": 1649364043, + "id": "text-babbage-001", + "object": "model", + "owned_by": "openai", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1675105935, + "group": null, + "id": "modelperm-a3Ph5FIBbJxsoA4wvx7VYC7R", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "text-babbage-001" + }, + { + "created": 1651172505, + "id": "text-search-davinci-doc-001", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1669066353, + "group": null, + "id": "modelperm-qhSf1j2MJMujcu3t7cHnF1DN", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "text-search-davinci-doc-001" + }, + { + "created": 1651172509, + "id": "text-search-babbage-query-001", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1669084981, + "group": null, + "id": "modelperm-Kg70kkFxD93QQqsVe4Zw8vjc", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "text-search-babbage-query-001" + }, + { + "created": 1651172510, + "id": "curie-similarity", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1675106290, + "group": null, + "id": "modelperm-zhWKExSloaQiJgzjVHFmh2wR", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "curie-similarity" + }, + { + "created": 1677649963, + "id": "gpt-3.5-turbo-0301", + "object": "model", + "owned_by": "openai", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1685049951, + "group": null, + "id": "modelperm-uk0JzgymvAJhyN6bMm1GHMop", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "gpt-3.5-turbo-0301" + }, + { + "created": 1649359874, + "id": "curie", + "object": "model", + "owned_by": "openai", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1675106503, + "group": null, + "id": "modelperm-oPaljeveTjEIDbhDjzFiyf4V", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "curie" + }, + { + "created": 1651172505, + "id": "text-similarity-davinci-001", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1669066356, + "group": null, + "id": "modelperm-OvmcfYoq5V9SF9xTYw1Oz6Ue", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "text-similarity-davinci-001" + }, + { + "created": 1649880484, + "id": "text-davinci-002", + "object": "model", + "owned_by": "openai", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1679355287, + "group": null, + "id": "modelperm-l4EU6QlN1HcS0so0jU16kyg8", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "text-davinci-002" + }, + { + "created": 1651172509, + "id": "davinci-similarity", + "object": "model", + "owned_by": "openai-dev", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": true, + "allow_view": true, + "created": 1669066353, + "group": null, + "id": "modelperm-lYYgng3LM0Y97HvB5CDc8no2", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "davinci-similarity" + }, + { + "created": 1590625110, + "id": "cushman:2020-05-03", + "object": "model", + "owned_by": "system", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": true, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1590625111, + "group": null, + "id": "snapperm-FAup8P1KqclNlTsunLDRiesT", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "cushman:2020-05-03" + }, + { + "created": 1607631625, + "id": "ada:2020-05-03", + "object": "model", + "owned_by": "system", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1607631626, + "group": null, + "id": "snapperm-9TYofAqUs54vytKYL0IX91rX", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "ada:2020-05-03" + }, + { + "created": 1607632611, + "id": "babbage:2020-05-03", + "object": "model", + "owned_by": "system", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1607632613, + "group": null, + "id": "snapperm-jaLAcmyyNuaVmalCE1BGTGwf", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "babbage:2020-05-03" + }, + { + "created": 1607632725, + "id": "curie:2020-05-03", + "object": "model", + "owned_by": "system", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1607632727, + "group": null, + "id": "snapperm-bt6R8PWbB2SwK5evFo0ZxSs4", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "curie:2020-05-03" + }, + { + "created": 1607640163, + "id": "davinci:2020-05-03", + "object": "model", + "owned_by": "system", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1607640164, + "group": null, + "id": "snapperm-99cbfQTYDVeLkTYndX3UMpSr", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "davinci:2020-05-03" + }, + { + "created": 1610745990, + "id": "if-davinci-v2", + "object": "model", + "owned_by": "openai", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1610746036, + "group": null, + "id": "snapperm-58q0TdK2K4kMgL3MoHvGWMlH", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "if-davinci-v2" + }, + { + "created": 1610745968, + "id": "if-curie-v2", + "object": "model", + "owned_by": "openai", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1610746043, + "group": null, + "id": "snapperm-fwAseHVq6NGe6Ple6tKfzRSK", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "if-curie-v2" + }, + { + "created": 1629420755, + "id": "if-davinci:3.0.0", + "object": "model", + "owned_by": "openai", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": true, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1629421809, + "group": null, + "id": "snapperm-T53lssiyMWwiuJwhyO9ic53z", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "if-davinci:3.0.0" + }, + { + "created": 1629498070, + "id": "davinci-if:3.0.0", + "object": "model", + "owned_by": "openai", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": true, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1629498084, + "group": null, + "id": "snapperm-s6ZIAVMwlZwrLGGClTXqSK3Q", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "davinci-if:3.0.0" + }, + { + "created": 1629501914, + "id": "davinci-instruct-beta:2.0.0", + "object": "model", + "owned_by": "openai", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": true, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1629501939, + "group": null, + "id": "snapperm-c70U4TBfiOD839xptP5pJzyc", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "davinci-instruct-beta:2.0.0" + }, + { + "created": 1641949608, + "id": "text-ada:001", + "object": "model", + "owned_by": "system", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1641949610, + "group": null, + "id": "snapperm-d2PSnwFG1Yn9of6PvrrhkBcU", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "text-ada:001" + }, + { + "created": 1641943966, + "id": "text-davinci:001", + "object": "model", + "owned_by": "system", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1641944340, + "group": null, + "id": "snapperm-Fj1O3zkKXOQy6AkcfQXRKcWA", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "text-davinci:001" + }, + { + "created": 1641955047, + "id": "text-curie:001", + "object": "model", + "owned_by": "system", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1641955123, + "group": null, + "id": "snapperm-BI9TAT6SCj43JRsUb9CYadsz", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "text-curie:001" + }, + { + "created": 1642018370, + "id": "text-babbage:001", + "object": "model", + "owned_by": "openai", + "parent": null, + "permission": [ + { + "allow_create_engine": false, + "allow_fine_tuning": false, + "allow_logprobs": true, + "allow_sampling": true, + "allow_search_indices": false, + "allow_view": true, + "created": 1642018480, + "group": null, + "id": "snapperm-7oP3WFr9x7qf5xb3eZrVABAH", + "is_blocking": false, + "object": "model_permission", + "organization": "*" + } + ], + "root": "text-babbage:001" + } + ], + "object": "list" +} diff --git a/python-chatgpt/img/python-chatgpt01.png b/python-chatgpt/img/python-chatgpt01.png new file mode 100644 index 0000000..da6ac38 Binary files /dev/null and b/python-chatgpt/img/python-chatgpt01.png differ