AIModelImpl
subclasses AILocalModelImpl, AIRemoteModelImpl
PivotAIModel ๊ตฌํ์ฒด์ ๊ณตํต ๋ฒ ์ด์ค.
name/description, ๋ฑ๋ก๋ ๋ช
๋ น ์บ์, registerCommands ํ๋ฆ(์๋ฒ ์ ์ก โ ์บ์ ๊ฐฑ์ ),
AICommand โ JSONSchema ๋ณํ์ ์ ๊ณตํ๋ค.
์ค์ ์ ์ก(_doRegisterCommands)๊ณผ ์ง์(call)๋ ์๋ธํด๋์ค๊ฐ ๊ตฌํํ๋ค.
Properties
systemContext: string (opens in a new tab) readonly
ํธ์ถ ์ธก(ํผ๋ฒ)์ด ์ค์ ํ๋ ์์คํ
์ปจํ
์คํธ.
๋ฐ์ดํฐ ํ๋ ๋ฉํยท๋์ ์ง์๋ฌธ ๋ฑ์ ๋ด์ผ๋ฉฐ, LLM ํธ์ถ ์ system ๋ฉ์์ง๋ก ์ฌ์ฉ๋๋ค.
default: undefined
tools: Array (opens in a new tab)<AIToolSchema> readonly
๋ชจ๋ธ์ ๋ฑ๋ก๋ ๋๊ตฌ ๋ชฉ๋ก.
default: undefined
Methods
call(api, query, toolChoice?): Promise (opens in a new tab)<AIConversationTurn>
์ฌ์ฉ์์ ์์ฐ์ด ์์ฒญ์ ์ ๋ฌํ๊ณ LLM์ ์๋ต์ ๋ฐ๋๋ค.
| Parameter | Type |
|---|---|
| api | PivotAIApi |
| query | string (opens in a new tab) |
| toolChoice | AIToolChoice |
dispose(): null
๊ฐ์ฒด๋ฅผ ํด์ ํ๊ณ null์ ๋ฐํํ๋ค.
์ฌ์ฉ ์: this._obj = this._obj.dispose();
returnย null
registerTools(tools, clear?): Promise (opens in a new tab)<void (opens in a new tab)>
๋ช
๋ น(๋๊ตฌ) ๋ชฉ๋ก์ ๋ฑ๋กํ๋ค.
์ ์ก(_doRegisterTools)์ด ์ฑ๊ณตํ ๊ฒฝ์ฐ์๋ง ๋ก์ปฌ ์บ์๋ฅผ ๊ฐฑ์ ํ๋ค.
clear๊ฐ true์ด๋ฉด ๊ธฐ์กด ๋ชฉ๋ก์ ๋น์ด ๋ค ๋ฑ๋กํ๊ณ , false(๊ธฐ๋ณธ)์ด๋ฉด ์ถ๊ฐํ๋ค.
| Parameter | Type |
|---|---|
| tools | Array (opens in a new tab)<AIToolSchema> |
| clear | boolean (opens in a new tab) |
setDeveloperContext(context?): void (opens in a new tab)
๊ฐ๋ฐ์ ์ปจํ
์คํธ๋ฅผ ์ค์ ํ๋ค(๊ฐ๋ฐ์ ๊ด๋ จ ์ ๋ณด๊ฐ ํ์ํ ๋ ํธ์ถ ์ธก์์ ์ง์ ).
undefined๋ฅผ ์ ๋ฌํ๋ฉด ์ปจํ
์คํธ๋ฅผ ํด์ ํ๋ค.
| Parameter | Type |
|---|---|
| context | string (opens in a new tab) |
setSystemContext(context?): void (opens in a new tab)
์์คํ
์ปจํ
์คํธ๋ฅผ ์ค์ ํ๋ค(ํผ๋ฒ ๋ฐ์ดํฐยทํ๋๊ฐ ์ ํด์ง ๋ ํธ์ถ ์ธก์์ ์ง์ ).
undefined๋ฅผ ์ ๋ฌํ๋ฉด ์ปจํ
์คํธ๋ฅผ ํด์ ํ๋ค.
| Parameter | Type |
|---|---|
| context | string (opens in a new tab) |