AI DevKit
Search Results for

    Show / Hide Table of Contents

    Class ThreadService

    Threads: https://platform.openai.com/docs/api-reference/threads

    Inheritance
    object
    CRUDServiceBase<OpenAI>
    ThreadService
    Inherited Members
    CRUDServiceBase<OpenAI>.client
    CRUDServiceBase<OpenAI>.IsBetaService
    CRUDServiceBase<OpenAI>.CustomApiKey
    CRUDServiceBase<OpenAI>.CustomBetaHeaders
    Namespace: Glitch9.AIDevKit.OpenAI.Services
    Assembly: .dll
    Syntax
    public class ThreadService : CRUDServiceBase<OpenAI>

    Constructors

    ThreadService(OpenAI, params RESTHeader[])

    Declaration
    public ThreadService(OpenAI client, params RESTHeader[] extraHeaders)
    Parameters
    Type Name Description
    OpenAI client
    RESTHeader[] extraHeaders

    Properties

    Messages

    Create messages within threads

    Declaration
    public MessageService Messages { get; }
    Property Value
    Type Description
    MessageService

    Runs

    Represents an execution run on a thread.

    Declaration
    public RunService Runs { get; }
    Property Value
    Type Description
    RunService

    Methods

    CreateAsync(RESTRequestOptions)

    Declaration
    public UniTask<Thread> CreateAsync(RESTRequestOptions options = null)
    Parameters
    Type Name Description
    RESTRequestOptions options
    Returns
    Type Description
    UniTask<Thread>

    DeleteAsync(string, RESTRequestOptions)

    Declaration
    public UniTask<bool> DeleteAsync(string threadId, RESTRequestOptions options = null)
    Parameters
    Type Name Description
    string threadId
    RESTRequestOptions options
    Returns
    Type Description
    UniTask<bool>

    GetSavedThreads()

    Declaration
    public List<Thread> GetSavedThreads()
    Returns
    Type Description
    List<Thread>

    RetrieveAsync(string, RESTRequestOptions)

    Declaration
    public UniTask<Thread> RetrieveAsync(string threadId, RESTRequestOptions options = null)
    Parameters
    Type Name Description
    string threadId
    RESTRequestOptions options
    Returns
    Type Description
    UniTask<Thread>

    UpdateAsync(string, Thread)

    Declaration
    public UniTask<Thread> UpdateAsync(string threadId, Thread thread)
    Parameters
    Type Name Description
    string threadId
    Thread thread
    Returns
    Type Description
    UniTask<Thread>
    In this article
    Back to top Generated by DocFX