AxAIOpenAIResponses
Base class for OpenAI AI services using the /v1/responses API endpoint
Extends
AxAIOpenAIResponsesBase
<AxAIOpenAIResponsesModel
,AxAIOpenAIEmbedModel
,TModelKey
,AxAIOpenAIResponsesRequest
<AxAIOpenAIResponsesModel
>>
Type Parameters
Type Parameter | Default type |
---|---|
TModelKey | string |
Constructors
Constructor
new AxAIOpenAIResponses<TModelKey>(__namedParameters: Readonly<Omit<AxAIOpenAIResponsesArgs<"openai-responses", AxAIOpenAIResponsesModel, AxAIOpenAIEmbedModel, TModelKey>, "name">>): AxAIOpenAIResponses<TModelKey>;
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <Omit <AxAIOpenAIResponsesArgs <"openai-responses" , AxAIOpenAIResponsesModel , AxAIOpenAIEmbedModel , TModelKey >, "name" >> |
Returns
AxAIOpenAIResponses
<TModelKey
>
Overrides
AxAIOpenAIResponsesBase
.constructor
Methods
chat()
chat(req: Readonly<AxChatRequest<TModel | TModelKey>>, options?: Readonly<AxAIServiceOptions>): Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>;
Defined in: https://github.com/ax-llm/ax/blob/8dfd0ce02b8cb386fb2c93fa280a2ec0da2d6011/src/ax/ai/base.ts#L870
Parameters
Parameter | Type |
---|---|
req | Readonly <AxChatRequest <TModel | TModelKey >> |
options? | Readonly <AxAIServiceOptions > |
Returns
Promise
<
| AxChatResponse
| ReadableStream
<AxChatResponse
>>
Inherited from
embed()
embed(req: Readonly<AxEmbedRequest<TEmbedModel>>, options?: Readonly<AxAIServiceOptions>): Promise<AxEmbedResponse>;
Defined in: https://github.com/ax-llm/ax/blob/8dfd0ce02b8cb386fb2c93fa280a2ec0da2d6011/src/ax/ai/base.ts#L1380
Parameters
Parameter | Type |
---|---|
req | Readonly <AxEmbedRequest <TEmbedModel >> |
options? | Readonly <AxAIServiceOptions > |
Returns
Promise
<AxEmbedResponse
>
Inherited from
getFeatures()
getFeatures(model?: AxAIOpenAIResponsesModel): AxAIFeatures;
Defined in: https://github.com/ax-llm/ax/blob/8dfd0ce02b8cb386fb2c93fa280a2ec0da2d6011/src/ax/ai/base.ts#L345
Parameters
Parameter | Type |
---|---|
model? | AxAIOpenAIResponsesModel |
Returns
Inherited from
AxAIOpenAIResponsesBase
.getFeatures
getId()
getId(): string;
Defined in: https://github.com/ax-llm/ax/blob/8dfd0ce02b8cb386fb2c93fa280a2ec0da2d6011/src/ax/ai/base.ts#L270
Returns
string
Inherited from
getLastUsedChatModel()
getLastUsedChatModel():
| undefined
| AxAIOpenAIResponsesModel;
Defined in: https://github.com/ax-llm/ax/blob/8dfd0ce02b8cb386fb2c93fa280a2ec0da2d6011/src/ax/ai/base.ts#L351
Returns
| undefined
| AxAIOpenAIResponsesModel
Inherited from
AxAIOpenAIResponsesBase
.getLastUsedChatModel
getLastUsedEmbedModel()
getLastUsedEmbedModel():
| undefined
| AxAIOpenAIEmbedModel;
Defined in: https://github.com/ax-llm/ax/blob/8dfd0ce02b8cb386fb2c93fa280a2ec0da2d6011/src/ax/ai/base.ts#L355
Returns
| undefined
| AxAIOpenAIEmbedModel
Inherited from
AxAIOpenAIResponsesBase
.getLastUsedEmbedModel
getLastUsedModelConfig()
getLastUsedModelConfig(): undefined | AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/8dfd0ce02b8cb386fb2c93fa280a2ec0da2d6011/src/ax/ai/base.ts#L359
Returns
undefined
| AxModelConfig
Inherited from
AxAIOpenAIResponsesBase
.getLastUsedModelConfig
getLogger()
getLogger(): AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/8dfd0ce02b8cb386fb2c93fa280a2ec0da2d6011/src/ax/ai/base.ts#L310
Returns
Inherited from
AxAIOpenAIResponsesBase
.getLogger
getMetrics()
getMetrics(): AxAIServiceMetrics;
Defined in: https://github.com/ax-llm/ax/blob/8dfd0ce02b8cb386fb2c93fa280a2ec0da2d6011/src/ax/ai/base.ts#L866
Returns
Inherited from
AxAIOpenAIResponsesBase
.getMetrics
getModelList()
getModelList(): (
| {
description: string;
embedModel?: undefined;
key: TModelKey;
model: string;
}
| {
description: string;
embedModel: string;
key: TModelKey;
model?: undefined;
})[];
Defined in: https://github.com/ax-llm/ax/blob/8dfd0ce02b8cb386fb2c93fa280a2ec0da2d6011/src/ax/ai/base.ts#L314
Returns
(
| {
description
: string
;
embedModel?
: undefined
;
key
: TModelKey
;
model
: string
;
}
| {
description
: string
;
embedModel
: string
;
key
: TModelKey
;
model?
: undefined
;
})[]
Inherited from
AxAIOpenAIResponsesBase
.getModelList
getName()
getName(): string;
Defined in: https://github.com/ax-llm/ax/blob/8dfd0ce02b8cb386fb2c93fa280a2ec0da2d6011/src/ax/ai/base.ts#L341
Returns
string
Inherited from
AxAIOpenAIResponsesBase
.getName
getOptions()
getOptions(): Readonly<AxAIServiceOptions>;
Defined in: https://github.com/ax-llm/ax/blob/8dfd0ce02b8cb386fb2c93fa280a2ec0da2d6011/src/ax/ai/base.ts#L295
Returns
Readonly
<AxAIServiceOptions
>
Inherited from
AxAIOpenAIResponsesBase
.getOptions
setAPIURL()
setAPIURL(apiURL: string): void;
Defined in: https://github.com/ax-llm/ax/blob/8dfd0ce02b8cb386fb2c93fa280a2ec0da2d6011/src/ax/ai/base.ts#L274
Parameters
Parameter | Type |
---|---|
apiURL | string |
Returns
void
Inherited from
AxAIOpenAIResponsesBase
.setAPIURL
setHeaders()
setHeaders(headers: () => Promise<Record<string, string>>): void;
Defined in: https://github.com/ax-llm/ax/blob/8dfd0ce02b8cb386fb2c93fa280a2ec0da2d6011/src/ax/ai/base.ts#L278
Parameters
Parameter | Type |
---|---|
headers | () => Promise <Record <string , string >> |
Returns
void
Inherited from
AxAIOpenAIResponsesBase
.setHeaders
setName()
setName(name: string): void;
Defined in: https://github.com/ax-llm/ax/blob/8dfd0ce02b8cb386fb2c93fa280a2ec0da2d6011/src/ax/ai/base.ts#L266
Parameters
Parameter | Type |
---|---|
name | string |
Returns
void
Inherited from
AxAIOpenAIResponsesBase
.setName
setOptions()
setOptions(options: Readonly<AxAIServiceOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/8dfd0ce02b8cb386fb2c93fa280a2ec0da2d6011/src/ax/ai/base.ts#L282
Parameters
Parameter | Type |
---|---|
options | Readonly <AxAIServiceOptions > |
Returns
void