# Bricks for AI

With so many use cases for Artificial Intelligence (AI) and Large Language Models (LLMs) these days, you'll likely want to incorporate AI in your mod. We have a couple bricks you can use to do that.&#x20;

### Chat with ChatGPT

To interact with OpenAI in PixieBrix, you can use the **Create Chat Response with ChatGPT** brick.&#x20;

The most important settings are:

* **OpenAI Configuration**: use our built-in one, or [add your own OpenAI integration](https://docs.pixiebrix.com/integrations/openai-chatgpt)
* **Model**: select from a model, including gpt-4.0
* **Messages**: define system and user prompts

<figure><img src="https://2274778196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq123bF1HPQPV35s5vHa1%2Fuploads%2F08Bk5vLMk9dE23ELFSl0%2Fimage.png?alt=media&#x26;token=542e30ec-8aa2-452d-91d3-47b66dfe174c" alt=""><figcaption></figcaption></figure>

Below that are additional settings you can change, but you can typically use the defaults unless you need to change something.

<figure><img src="https://2274778196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq123bF1HPQPV35s5vHa1%2Fuploads%2FyeZrHHVQiLrLivEiwUC5%2Fimage.png?alt=media&#x26;token=1b5b1f1b-cb0e-4504-b896-a0f6c4744cc0" alt=""><figcaption></figcaption></figure>

Learn more by reading the [Create Chat Responses with ChatGPT brick docs](https://www.pixiebrix.com/marketplace/a3f44286-89c1-4a14-b6bb-4512cbfde425/?utm_source=pixiebrix\&utm_medium=page_editor\&utm_campaign=docs\&utm_content=view_docs_link).

### Few Shot Prompting with ChatGPT&#x20;

If you're trying to do something very specific and want to train your brick, use the Few Shot Prompt brick to provide examples of expected output from your provided inputs.&#x20;

<figure><img src="https://2274778196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq123bF1HPQPV35s5vHa1%2Fuploads%2FMPzHAuEkjlpm8f7ea7vU%2Fimage.png?alt=media&#x26;token=5012111b-47b6-4f40-8d7e-42417a04bfd9" alt=""><figcaption></figcaption></figure>

Learn more in the [Few Shot Prompt brick docs](https://www.pixiebrix.com/marketplace/1e212b34-84e9-4903-a983-a5842a6dce22/).

### Chat with PaLM

We also have a few bricks for working with PaLM, Google's LLM.&#x20;

* [Create Chat Response with PaLM](https://www.pixiebrix.com/marketplace/eea3eb03-8fed-40ba-8683-7b63bda5d115/)
* [Create Text Response with PaLM](https://www.pixiebrix.com/marketplace/79905671-2ca8-4ac3-9c84-c4ee3d23287f/)
* [Parse/Repair PaLM JSON Response](https://www.pixiebrix.com/marketplace/4c34922f-58fc-49f1-b779-2cdcfe9ae41f/)

### Custom AI models

If you'd like to work with a model that we don't already have a brick for, you can use the HTTP Request brick to integrate with any model that has an API.&#x20;

Learn more about [creating integrations](https://docs.pixiebrix.com/integrations) and [working with APIs](https://docs.pixiebrix.com/developing-mods/developer-concepts/working-with-apis) in PixieBrix.
