<!--
 ⚠️  AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
 This file is automatically generated by scripts/docs-generator.js
 To make changes, edit the source TypeScript files or update the generator script
-->

[openai](../../) / [Exports](../modules) / IPayloadLogger

# Interface: IPayloadLogger

IPayloadLogger interface for logging OpenAI API payloads

This interface provides a contract for different logging implementations:

- FilePayloadLogger: Node.js file-based logging
- ConsolePayloadLogger: Browser console-based logging
- Custom implementations: User-defined loggers

## Table of contents

### Methods

- [isEnabled](IPayloadLogger#isenabled)
- [logPayload](IPayloadLogger#logpayload)

## Methods

### isEnabled

▸ **isEnabled**(): `boolean`

Check if logging is enabled

#### Returns

`boolean`

true if logging is active, false otherwise

#### Defined in

[openai/src/interfaces/payload-logger.ts:17](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/openai/src/interfaces/payload-logger.ts#L17)

---

### logPayload

▸ **logPayload**(`payload`, `type`): `Promise`\<`void`\>

Log API payload data

#### Parameters

| Name      | Type                   | Description                            |
| :-------- | :--------------------- | :------------------------------------- |
| `payload` | `OpenAILogData`        | The API request/response payload data  |
| `type`    | `"chat"` \| `"stream"` | Type of operation ('chat' or 'stream') |

#### Returns

`Promise`\<`void`\>

#### Defined in

[openai/src/interfaces/payload-logger.ts:24](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/openai/src/interfaces/payload-logger.ts#L24)
