# PromptLayerOpenAI

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/llms/promptlayer_openai/PromptLayerOpenAI)

PromptLayer OpenAI large language models.

To use, you should have the ``openai`` and ``promptlayer`` python
package installed, and the environment variable ``OPENAI_API_KEY``
and ``PROMPTLAYER_API_KEY`` set with your openAI API key and
promptlayer key respectively.

All parameters that can be passed to the OpenAI LLM can also
be passed here. The PromptLayerOpenAI LLM adds two optional

## Signature

```python
PromptLayerOpenAI()
```

## Description

**Example:**

.. code-block:: python

from langchain_community.llms import PromptLayerOpenAI
openai = PromptLayerOpenAI(model_name="gpt-3.5-turbo-instruct")

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| ```pl_tags``` | `unknown` | Yes | List of strings to tag the request with. |
| ```return_pl_id``` | `unknown` | Yes | If True, the PromptLayer request ID will be returned in the ``generation_info`` field of the ``Generation`` object. |

## Extends

- `OpenAI`

## Properties

- `pl_tags`
- `return_pl_id`

## Methods

- [`is_lc_serializable()`](https://reference.langchain.com/python/langchain-community/llms/promptlayer_openai/PromptLayerOpenAI/is_lc_serializable)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/4b280287bd55b99b44db2dd849f02d66c89534d5/libs/community/langchain_community/llms/promptlayer_openai.py#L13)