Table of Contents

Class ThreadService

public class ThreadService : CrudServiceBase<OpenAIClient>, IBetaApi
Inheritance
object
ThreadService
Implements
IBetaApi

Constructors

ThreadService(OpenAIClient)

public ThreadService(OpenAIClient client)

Parameters

client OpenAIClient

Properties

Messages

Create messages within threads

public MessageService Messages { get; }

Property Value

MessageService

Runs

Represents an execution run on a thread.

public RunService Runs { get; }

Property Value

RunService

Methods

CreateAsync(RESTOptions)

public UniTask<Thread> CreateAsync(RESTOptions options = null)

Parameters

options RESTOptions

Returns

UniTask<Thread>

CreateAsync(string, RESTOptions)

public UniTask<Thread> CreateAsync(string agentId, RESTOptions options = null)

Parameters

agentId string
options RESTOptions

Returns

UniTask<Thread>

DeleteAsync(string, RESTOptions)

public UniTask<bool> DeleteAsync(string threadId, RESTOptions options = null)

Parameters

threadId string
options RESTOptions

Returns

UniTask<bool>

GetList(string)

public List<Thread> GetList(string assistantId = null)

Parameters

assistantId string

Returns

List<Thread>

RetrieveAsync(string, RESTOptions)

public UniTask<Thread> RetrieveAsync(string threadId, RESTOptions options = null)

Parameters

threadId string
options RESTOptions

Returns

UniTask<Thread>

UpdateAsync(Thread, RESTOptions)

public UniTask<Thread> UpdateAsync(Thread thread, RESTOptions options = null)

Parameters

thread Thread
options RESTOptions

Returns

UniTask<Thread>