Huggingface.js 文档

类: HfAgent

Hugging Face's logo
加入 Hugging Face 社区

并获得增强的文档体验

开始使用

类: HfAgent

构造函数

constructor

new HfAgent(accessToken?, LLM?, tools?): HfAgent

参数

名称 类型 默认值
accessToken string ""
LLM? LLM undefined
tools? Tool[] undefined

返回值

HfAgent

定义于

HfAgent.ts:14

属性

accessToken

Private accessToken: string

定义于

HfAgent.ts:10


llm

Private llm: LLM

定义于

HfAgent.ts:11


tools

Private tools: Tool[]

定义于

HfAgent.ts:12

方法

evaluateCode

evaluateCode(code, files?): Promise\<Update[]>

参数

名称 类型
code string
files? FileList

返回值

Promise\<Update[]>

定义于

HfAgent.ts:31


generateCode

generateCode(prompt, files?): Promise\<string>

参数

名称 类型
prompt string
files? FileList

返回值

Promise\<string>

定义于

HfAgent.ts:27


generatePrompt

generatePrompt(prompt, files?): string

参数

名称 类型
prompt string
files? FileList

返回值

string

定义于

HfAgent.ts:20


run

run(prompt, files?): Promise\<Update[]>

参数

名称 类型
prompt string
files? FileList

返回值

Promise\<Update[]>

定义于

HfAgent.ts:51

< > 在 GitHub 上更新