Represents an endpoint for making requests. Utilizes OpenAI service for processing the requests.

Constructors

  • Constructs an EndPoint instance.

    Parameters

    • model: string

      The model name to be used in OpenAI Service.

    • apiKey: string

      The API key for OpenAI service authentication.

    Returns EndPoint

Properties

openaiService: OpenAIService

Service object for interacting with OpenAI.

requestContent: string

The content of the request to be sent.

Methods

  • Determines the type of HTTP method to be used for the endpoint. Currently, it returns a fixed value.

    Returns string

    The HTTP method type.

  • Selects the appropriate endpoint and processes the request.

    Parameters

    • requestContent: string

      The content of the request.

    • apiEndpointFilePath: string

      Path to the API endpoint configuration.

    Returns Promise<any>

    A promise that resolves to the result of the OpenAI service call.

    Async

    Throws

    Will throw an error if the OpenAI service call fails.

Generated using TypeDoc