> For the complete documentation index, see [llms.txt](https://docs.dat-hub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dat-hub.com/integrations/generators/openai.md).

# OpenAI

## Overview

The OpenAI Generator connector allows you to generate embeddings using OpenAI's models. This connector integrates OpenAI's powerful language models into your data pipeline, enabling you to create vector embeddings as part of your data processing workflow.

## Configuration Options

**Name**: This field represents the name you want to assign to the actor instance responsible for managing the OpenAI Generator. Choose a descriptive and unique name to easily identify this instance within your data activation tool (dat).

**OpenAI API Key**: Enter your OpenAI API key. This key is required to authenticate your requests to the OpenAI API. You can obtain this key from your OpenAI account dashboard. Keep this key secure and never share it publicly.

**OpenAI Model**: Specify the OpenAI model you want to use for generation tasks. The default model is 'text-embedding-ada-002', which is optimized for creating text embeddings. You can choose other models based on your specific needs, such as GPT models for text generation or DALL-E for image generation.

## Additional Information

* The default model 'text-embedding-ada-002' is suitable for creating vector embeddings of text, which can be useful for similarity searches, clustering, or other machine learning tasks.
* If you need different functionalities, such as text completion or generation, you may want to specify a different model (e.g., 'gpt-3.5-turbo' or 'gpt-4').
* Be aware of the pricing associated with different OpenAI models and the volume of requests you're making.
* Ensure that your use of the OpenAI API complies with OpenAI's use case policies and terms of service.

## Other Considerations

* Consider implementing rate limiting in your data pipeline to avoid exceeding OpenAI's API rate limits.
* Be mindful of the token limits for different models when processing large amounts of text.
* For embedding generation, consider the dimensionality of the output and ensure it's compatible with your downstream vector storage or processing steps.
* If you're using this connector for sensitive data, be aware of data privacy implications when sending text to external APIs.

Once you've filled in the required fields, you can use the "Test and Save" button to validate the provided information and create or update the OpenAI Generator connector in your dat configuration.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.dat-hub.com/integrations/generators/openai.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
