AxAIHuggingFace
Class: AxAIHuggingFace
Extends
AxBaseAI
<AxAIHuggingFaceRequest
,unknown
,AxAIHuggingFaceResponse
,unknown
,unknown
>
Constructors
new AxAIHuggingFace()
new AxAIHuggingFace(
__namedParameters
):AxAIHuggingFace
Parameters
• __namedParameters: Readonly
<Omit
<AxAIHuggingFaceArgs
, "name"
>>
Returns
Overrides
Defined in
src/ax/ai/huggingface/api.ts:52
Properties
apiURL
protected
apiURL:string
Inherited from
Defined in
generateChatStreamResp()?
optional
generateChatStreamResp: (resp
,state
) =>AxChatResponse
Parameters
• resp: Readonly
<unknown
>
• state: object
Returns
Inherited from
AxBaseAI
.generateChatStreamResp
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
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
,AxAIHuggingFaceRequest
]
Parameters
• req: Readonly
<AxInternalChatRequest
>
• _config: Readonly
<AxAIPromptConfig
>
Returns
Overrides
AxBaseAI.generateChatReq
Defined in
src/ax/ai/huggingface/api.ts:90
generateChatResp()
generateChatResp(
resp
):AxChatResponse
Parameters
• resp: Readonly
<AxAIHuggingFaceResponse
>
Returns
Overrides
AxBaseAI.generateChatResp
Defined in
src/ax/ai/huggingface/api.ts:164
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
src/ax/ai/huggingface/api.ts:78
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