# ChatGptThreadUsageRequest

A root thread and explicitly known descendants for a provider lifetime-usage query.

Class 

`IntelligenceX.OpenAI.Usage`

**Namespace**

`IntelligenceX.OpenAI.Usage`

**Assembly**

`IntelligenceX`

**Source**

[ChatGptThreadUsage.cs:11](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Providers/OpenAI/Usage/ChatGptThreadUsage.cs#L11)

**Modifiers**

sealed

A root thread and explicitly known descendants for a provider lifetime-usage query.

## Inheritance

- object
- ChatGptThreadUsageRequest

## Usage

Explore 1 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Accepted by parameters 1

- Method [ChatGptUsageService.QueryThreadUsageAsync](/api/intelligencex-openai-usage-chatgptusageservice/#method-querythreadusageasync-collections-generic-ireadonlylist-intelligencex-openai-usage-chatgptthreadusagerequest-threading-cancellationtoken) parameter `threads`

Filter members 

Show inherited

## Constructors

`public ChatGptThreadUsageRequest(string threadId, DateTimeOffset? createdAt = null, IReadOnlyList<string>? descendantThreadIds = null)` [#](#constructor-ctor-string-nullable-system-datetimeoffset-collections-generic-ireadonlylist-system-string)

[ChatGptThreadUsage.cs:11](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Providers/OpenAI/Usage/ChatGptThreadUsage.cs#L11)

Creates a query group. Supply all known descendants for complete task accounting.

Parameters

**threadId string required**

**createdAt System.DateTimeOffset? = null optional**

**descendantThreadIds System.Collections.Generic.IReadOnlyList<string>? = null optional**

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public string ThreadId { get; }` [#](#property-threadid)

[ChatGptThreadUsage.cs:17](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Providers/OpenAI/Usage/ChatGptThreadUsage.cs#L17)

Provider root thread identifier.

`public DateTimeOffset? CreatedAt { get; }` [#](#property-createdat)

[ChatGptThreadUsage.cs:19](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Providers/OpenAI/Usage/ChatGptThreadUsage.cs#L19)

Root creation time, when known; unknown times are sent as JSON null in the provider query.

`public IReadOnlyList<string> DescendantThreadIds { get; }` [#](#property-descendantthreadids)

[ChatGptThreadUsage.cs:21](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Providers/OpenAI/Usage/ChatGptThreadUsage.cs#L21)

Descendants belonging only to this root; groups must not overlap.

<!-- PowerForge markdown artifact sha256:F652DC61735F84CEF88AED6EB0D34F47321F844E02F5483325B2F9199A0A00CB -->
