Class: HfAgent
Constructors
constructor
• new HfAgent(accessToken?
, LLM?
, tools?
): HfAgent
Parameters
Name | Type | Default value |
---|---|---|
accessToken | string | "" |
LLM? | LLM | undefined |
tools? | Tool [] | undefined |
Returns
Defined in
Properties
accessToken
• Private
accessToken: string
Defined in
llm
• Private
llm: LLM
Defined in
tools
• Private
tools: Tool
[]
Defined in
Methods
evaluateCode
▸ evaluateCode(code
, files?
): Promise
\<Update
[]>
Parameters
Name | Type |
---|---|
code | string |
files? | FileList |
Returns
Promise
\<Update
[]>
Defined in
generateCode
▸ generateCode(prompt
, files?
): Promise
\<string
>
Parameters
Name | Type |
---|---|
prompt | string |
files? | FileList |
Returns
Promise
\<string
>
Defined in
generatePrompt
▸ generatePrompt(prompt
, files?
): string
Parameters
Name | Type |
---|---|
prompt | string |
files? | FileList |
Returns
string
Defined in
run
▸ run(prompt
, files?
): Promise
\<Update
[]>
Parameters
Name | Type |
---|---|
prompt | string |
files? | FileList |
Returns
Promise
\<Update
[]>