> For the complete documentation index, see [llms.txt](https://docs.flosum.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flosum.com/devops/devops-es/codigo/herramientas-de-codigo/uso-de-ai-code-documenter.md).

# Uso de AI Code Documenter

{% hint style="warning" %}

#### Escrito para la antigua interfaz de usuario

Este artículo fue escrito para la antigua interfaz de usuario. Las instrucciones todavía se pueden usar, pero las capturas de pantalla están desactualizadas. En algunos casos, los elementos mencionados en las instrucciones se han movido o cambiado. Si no puede encontrar un elemento, consulte el [¿Dónde quedó?](/devops/devops-es/transicion-a-la-nueva-ui-ux/donde-quedo.md) artículo.
{% endhint %}

## ![](https://2574462044-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FG5ZbxX918xOHwbAwAJ4n%2FSummary2-Small-Icon.svg?alt=media\&token=da26a67f-ff7f-47b3-8669-06be960dc2d7) Resumen

Este artículo explica cómo usar AI Code Documenter para generar automáticamente documentación para un componente seleccionado. Ayuda a los equipos a crear documentación de código clara y bien estructurada que puedes confirmar en la rama.

{% hint style="info" %}

#### Limitaciones predeterminadas de la IA

De forma predeterminada, Flosum proporciona un modelo de IA DeepSeek compartido gratuito para DevOps a través de la API de DeepSeek. Debido a que se comparte entre inquilinos, el rendimiento y la disponibilidad dependen de la carga del sistema y de la capacidad de tokens. Durante un uso intensivo, es posible que vea una mayor latencia o errores temporales. Para evitar esto, puede agregar su propio modelo de IA personalizado. Consulte el siguiente artículo.

* [Agregar un modelo de IA personalizado](/devops/devops-es/configuracion/configuracion-de-ia/agregar-un-modelo-de-ia-personalizado.md)
  {% endhint %}

{% hint style="info" %}

#### Buenas prácticas

* Ejecuta AI Code Documenter sobre código estable para evitar regenerar comentarios repetidamente.
* Revisa siempre los comentarios de IA antes de confirmar para garantizar la precisión y la terminología correcta.
* Confirma en fragmentos pequeños y lógicos para mantener sencilla la revisión y la reversión.
  {% endhint %}

## Uso de AI Code Documenter

{% stepper %}
{% step %}

### Seleccione una rama y un componente

1. Haz clic en **Código** desde el menú de la barra lateral izquierda.
2. Haz clic en la rama que contiene el componente que quieres documentar.

   <div align="left"><figure><img src="https://2574462044-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2F6BzOyFRxWUmCMo2l6oqX%2FUsingAiCodeDocumenter-S01-01.png?alt=media&amp;token=45147edb-dce8-43c2-8363-0026e0ea0e75" alt="" width="563"><figcaption></figcaption></figure></div>
3. Haz clic en el componente que quieres documentar.

   <div align="left"><figure><img src="https://2574462044-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FbACIdtJEKsFKAbOzLGya%2FUsingAiCodeDocumenter-S01-02.png?alt=media&amp;token=6059fd06-4a29-4ba4-9bfb-1d3b06c3319c" alt="" width="563"><figcaption></figcaption></figure></div>

{% endstep %}

{% step %}

### Crear documentación

1. Haz clic en **Herramientas de IA** junto a **Editar**.

   <div align="left"><figure><img src="https://2574462044-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2Fdoy4RFvG41k7BUW8PW0l%2FUsingAiCodeDocumenter-S02-01.png?alt=media&amp;token=e907df18-b638-41f7-851c-e9e02a26da53" alt="" width="563"><figcaption></figcaption></figure></div>
2. Haz clic en **AI Code Documenter** en el menú desplegable.

   <div align="left"><figure><img src="https://2574462044-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2F1SmvnqItxXChdTI1dHW7%2FUsingAiCodeDocumenter-S02-02.png?alt=media&amp;token=20f5838e-7fb2-49c0-859d-4e46c3aa2f69" alt="" width="563"><figcaption></figcaption></figure></div>
3. Mientras se genera la documentación, **La IA está generando...** se muestra.

   <div align="left"><figure><img src="https://2574462044-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FqXbSTdANEjNUJ42toBR8%2FUsingAiCodeDocumenter-S02-03.png?alt=media&amp;token=c4c3a173-595f-47e9-829d-d1168c23bca2" alt="" width="563"><figcaption></figcaption></figure></div>
4. Cuando AI Code Documenter termina, se abre el visor de diferencias, con el original a la izquierda y los cambios de IA a la derecha.
5. Revisa los cambios y realiza cualquier edición necesaria.
6. Haz clic en **Confirmar cambios**.

   <div align="left"><figure><img src="https://2574462044-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FsVAccDOWzK4WVUtpA8Z3%2FUsingAiCodeDocumenter-S02-04.png?alt=media&amp;token=55c2927b-d75a-4b7f-907a-850c6f2d0466" alt="" width="563"><figcaption></figcaption></figure></div>
7. Introduce un **mensaje de commit**.
8. Haz clic en **Confirmar**.

   <div align="left"><figure><img src="https://2574462044-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FnQ5nleu5HFSzzbfEVVQG%2FUsingAiCodeDocumenter-S02-05.png?alt=media&amp;token=75d392c3-c1b6-42c0-99d2-7d6ee85b8d8e" alt="" width="563"><figcaption></figcaption></figure></div>

{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flosum.com/devops/devops-es/codigo/herramientas-de-codigo/uso-de-ai-code-documenter.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
