AxAICohere
Class: AxAICohere
Extends
AxBaseAI
<AxAICohereChatRequest
,AxAICohereEmbedRequest
,AxAICohereChatResponse
,AxAICohereChatResponseDelta
,AxAICohereEmbedResponse
>
Constructors
new AxAICohere()
new AxAICohere(
__namedParameters
):AxAICohere
Parameters
• __namedParameters: Readonly
<Omit
<AxAICohereArgs
, "name"
>>
Returns
Overrides
Defined in
Properties
apiURL
protected
apiURL:string
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
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
,_config
): [API
,AxAICohereChatRequest
]
Parameters
• req: Readonly
<AxInternalChatRequest
>
• _config: Readonly
<AxAIPromptConfig
>
Returns
Overrides
AxBaseAI.generateChatReq
Defined in
generateChatResp()
generateChatResp(
resp
):AxChatResponse
Parameters
• resp: Readonly
<AxAICohereChatResponse
>
Returns
Overrides
AxBaseAI.generateChatResp
Defined in
generateChatStreamResp()
generateChatStreamResp(
resp
,state
):AxChatResponse
Parameters
• resp: Readonly
<AxAICohereChatResponseDelta
>
• state: object
Returns
Overrides
AxBaseAI.generateChatStreamResp
Defined in
generateEmbedReq()
generateEmbedReq(
req
): [API
,AxAICohereEmbedRequest
]
Parameters
• req: Readonly
<AxInternalEmbedRequest
>
Returns
Overrides
AxBaseAI.generateEmbedReq
Defined in
generateEmbedResp()
generateEmbedResp(
resp
):AxEmbedResponse
Parameters
• resp: Readonly
<AxAICohereEmbedResponse
>
Returns
Overrides
AxBaseAI.generateEmbedResp
Defined in
getEmbedModelInfo()
getEmbedModelInfo():
undefined
|AxModelInfoWithProvider
Returns
undefined
| AxModelInfoWithProvider
Inherited from
Defined in
getFeatures()
getFeatures():
AxBaseAIFeatures
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