AxAIAnthropic
Class: AxAIAnthropic
Extends
AxBaseAI
<AxAIAnthropicChatRequest
,unknown
,AxAIAnthropicChatResponse
,AxAIAnthropicChatResponseDelta
,unknown
>
Constructors
new AxAIAnthropic()
new AxAIAnthropic(
__namedParameters
):AxAIAnthropic
Parameters
• __namedParameters: Readonly
<Omit
<AxAIAnthropicArgs
, "name"
>>
Returns
Overrides
Defined in
Properties
apiURL
protected
apiURL:string
Inherited from
Defined in
generateEmbedReq()?
optional
generateEmbedReq: (req
) => [API
,unknown
]
Parameters
• req: Readonly
<AxInternalEmbedRequest
>
Returns
[API
, unknown
]
Inherited from
Defined in
generateEmbedResp()?
optional
generateEmbedResp: (resp
) =>AxEmbedResponse
Parameters
• resp: Readonly
<unknown
>
Returns
Inherited from
Defined in
headers
protected
headers:Record
<string
,string
>
Inherited from
Defined in
name
protected
name:string
Inherited from
Defined in
supportFor
protected
supportFor:AxBaseAIFeatures
| (model
) =>AxBaseAIFeatures
Inherited from
Defined in
Methods
_chat()
_chat(
model
,chatReq
,options
?,span
?):Promise
<AxChatResponse
|ReadableStream
<AxChatResponse
>>
Parameters
• model: string
• chatReq: Readonly
<AxChatRequest
>
• options?: Readonly
<AxAIPromptConfig
& AxAIServiceActionOptions
>
• span?: AxSpan
Returns
Promise
<AxChatResponse
| ReadableStream
<AxChatResponse
>>
Inherited from
Defined in
_embed()
_embed(
embedModel
,embedReq
,options
?,span
?):Promise
<AxEmbedResponse
>
Parameters
• embedModel: string
• embedReq: Readonly
<AxEmbedRequest
>
• options?: Readonly
<AxAIServiceActionOptions
>
• span?: AxSpan
Returns
Promise
<AxEmbedResponse
>
Inherited from
Defined in
chat()
chat(
req
,options
?):Promise
<AxChatResponse
|ReadableStream
<AxChatResponse
>>
Parameters
• req: Readonly
<AxChatRequest
>
• options?: Readonly
<AxAIPromptConfig
& AxAIServiceActionOptions
>
Returns
Promise
<AxChatResponse
| ReadableStream
<AxChatResponse
>>
Inherited from
Defined in
embed()
embed(
req
,options
?):Promise
<AxEmbedResponse
>
Parameters
• req: Readonly
<AxEmbedRequest
>
• options?: Readonly
<AxAIServiceActionOptions
>
Returns
Promise
<AxEmbedResponse
>
Inherited from
Defined in
generateChatReq()
generateChatReq(
req
): [API
,AxAIAnthropicChatRequest
]
Parameters
• req: Readonly
<AxInternalChatRequest
>
Returns
[API
, AxAIAnthropicChatRequest
]
Overrides
AxBaseAI.generateChatReq
Defined in
generateChatResp()
generateChatResp(
resp
):AxChatResponse
Parameters
• resp: Readonly
<AxAIAnthropicChatResponse
| AxAIAnthropicChatError
>
Returns
Overrides
AxBaseAI.generateChatResp
Defined in
src/ax/ai/anthropic/api.ts:142
generateChatStreamResp()
generateChatStreamResp(
resp
,state
):AxChatResponse
Parameters
• resp: Readonly
<AxAIAnthropicChatResponseDelta
>
• state: object
Returns
Overrides
AxBaseAI.generateChatStreamResp
Defined in
src/ax/ai/anthropic/api.ts:188
getEmbedModelInfo()
getEmbedModelInfo():
undefined
|AxModelInfoWithProvider
Returns
undefined
| AxModelInfoWithProvider
Inherited from
Defined in
getFeatures()
getFeatures(
model
?):AxBaseAIFeatures
Parameters
• model?: string
Returns
Inherited from
Defined in
getModelConfig()
getModelConfig():
AxModelConfig
Returns
Overrides
Defined in
getModelInfo()
getModelInfo():
Readonly
<AxModelInfoWithProvider
>
Returns
Readonly
<AxModelInfoWithProvider
>
Inherited from
Defined in
getModelMap()
getModelMap():
undefined
|AxAIModelMap
Returns
undefined
| AxAIModelMap
Inherited from
Defined in
getName()
getName():
string
Returns
string
Inherited from
Defined in
setAPIURL()
setAPIURL(
apiURL
):void
Parameters
• apiURL: string
Returns
void
Inherited from
Defined in
setHeaders()
setHeaders(
headers
):void
Parameters
• headers: Record
<string
, string
>
Returns
void
Inherited from
Defined in
setName()
setName(
name
):void
Parameters
• name: string
Returns
void
Inherited from
Defined in
setOptions()
setOptions(
options
):void
Parameters
• options: Readonly
<AxAIServiceOptions
>
Returns
void