> ## Documentation Index
> Fetch the complete documentation index at: https://crewai.burt.pe.kr/llms.txt
> Use this file to discover all available pages before exploring further.

# DALL-E Tool

> DallETool은 텍스트 설명을 기반으로 이미지를 생성하는 강력한 도구다.

# `DallETool`

## 설명

이 도구는 에이전트가 DALL-E 모델을 사용해 이미지를 생성할 수 있게 해준다. DALL-E는 텍스트 설명을 기반으로 이미지를 생성하는 트랜스포머 기반 모델이다. 이 도구를 사용하면 에이전트가 사용자가 입력한 텍스트를 바탕으로 이미지를 만들어낼 수 있다.

## 설치

crewai\_tools 패키지를 설치한다.

```shell theme={null}
pip install 'crewai[tools]'
```

## 예제

이 도구를 사용할 때, 이미지에 대한 설명은 반드시 에이전트가 직접 생성해야 한다. 생성할 이미지를 설명하는 텍스트를 작성해야 한다.

```python theme={null}
from crewai_tools import DallETool

Agent(
    ...
    tools=[DallETool()],
)
```

필요한 경우 DALL-E 모델의 파라미터를 조정하여 `DallETool` 클래스에 인자로 전달할 수 있다. 예를 들어:

```python theme={null}
from crewai_tools import DallETool

dalle_tool = DallETool(model="dall-e-3",
                       size="1024x1024",
                       quality="standard",
                       n=1)

Agent(
    ...
    tools=[dalle_tool]
)
```

이 파라미터들은 OpenAI API의 `client.images.generate` 메서드를 기반으로 한다. 파라미터에 대한 자세한 내용은 [OpenAI API 문서](https://platform.openai.com/docs/guides/images/introduction?lang=python)를 참조한다.
