coachBot
- Description:
- Coach Bot API methods
- Source:
Members
(static, readonly) MESSAGE_ROLES :string
Properties:
Name | Type | Description |
---|---|---|
USER |
string | |
ASSISTANT |
string |
Type:
- string
Methods
(async, static) ask(data, options, onDoneopt) → {Promise}
- Description:
- Ask bot
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
data |
codioIDE.coachBot.CoachBotCustomRequestData | request data | |
options |
codioIDE.coachBot.CoachBotCustomRequestOptions | AskBotDoneCallback | request options or done callback | |
onDone |
codioIDE.coachBot.AskBotDoneCallback |
<optional> |
on request done callback |
Returns:
- Type
- Promise
(static) call(optionsopt)
- Description:
- Opens Coach Bot and calls action
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
codioIDE.coachBot.CoachBotCallOptions |
<optional> |
optional call action options |
(static) close()
- Description:
- Closes Coach Bot
- Source:
(static) deregister(id)
- Description:
- Deregister coach bot menu item
- Source:
Parameters:
Name | Type | Description |
---|---|---|
id |
string | action id to deregister |
(async, static) getContext() → {Promise.<codioIDE.coachBot.CoachBotContext>}
- Description:
- Get coach bot context
- Source:
Returns:
- Type
- Promise.<codioIDE.coachBot.CoachBotContext>
(async, static) getHistory() → {Promise.<Array.<codioIDE.coachBot.CoachBotMessage>>}
- Description:
- Get history messages
- Source:
Returns:
- Type
- Promise.<Array.<codioIDE.coachBot.CoachBotMessage>>
(async, static) getLlmProxyDetails() → {Promise.<Array.<codioIDE.coachBot.LlmProxyDetails>>}
- Description:
- Get LLM proxy details
- Source:
Returns:
- Type
- Promise.<Array.<codioIDE.coachBot.LlmProxyDetails>>
(static) hideTooltip()
- Description:
- Hide Coach bot tooltip
- Source:
(async, static) input(text, defaultText) → {Promise.<string>}
- Description:
- Show user input
- Source:
Parameters:
Name | Type | Description |
---|---|---|
text |
string | text that would be shown before input |
defaultText |
string | prepopulate text for the input |
Returns:
- user input
- Type
- Promise.<string>
(static) open(optionsopt)
- Description:
- Opens Coach Bot
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
codioIDE.coachBot.CoachBotCallOptions |
<optional> |
optional call action options |
(static) register()
- Description:
- Register coach bot menu item
- Source:
Properties:
Name | Type | Description |
---|---|---|
id |
string | A unique ID. |
name |
string | Button text. |
callback |
codioIDE.coachBot.Callback | Called on button click |
(static) showButton(text, callback)
- Description:
- Show custom button in the coach bot
- Source:
Parameters:
Name | Type | Description |
---|---|---|
text |
string | Button text. |
callback |
codioIDE.coachBot.Callback | button on click handler |
(static) showMenu()
- Description:
- Show coach bot menu
- Source:
(static) showTooltip(message, callback)
- Description:
- Show Coach bot tooltip
- Source:
Parameters:
Name | Type | Description |
---|---|---|
message |
string | tooltip message |
callback |
codioIDE.coachBot.Callback | executes when tooltip clicked |
(static) write(text, ownerTypeopt)
- Description:
- Show custom message in the coach bot
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
text |
string | plain text | |
ownerType |
codioIDE.coachBot.MESSAGE_ROLES |
<optional> |
message type, default is ASSISTANT |
Type Definitions
AskBotDoneCallback(result)
- Description:
- Ask bot done callback
- Source:
Parameters:
Name | Type | Description |
---|---|---|
result |
codioIDE.coachBot.CoachBotAskCallbackData | done result |
Callback()
- Description:
- Simple callback
- Source:
CoachBotAskCallbackData
Properties:
Name | Type | Description |
---|---|---|
interrupted |
boolean | was interrupted by user(user click 'back' button) |
error |
Object | request error |
Type:
- Object
CoachBotCallOptions
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
id |
string | action id to start | |
defaultValues |
Object |
<optional> |
default values for action |
params |
Object |
<optional> |
additional params for action that will be passed to the action handler |
Type:
- Object
CoachBotContext
Properties:
Name | Type | Description |
---|---|---|
guidesPage |
codioIDE.coachBot.CoachBotContext.GuidesPage | opened guides page info |
assignmentData |
codioIDE.coachBot.CoachBotContext.AssignmentData | assignment info |
files |
Array.<codioIDE.coachBot.CoachBotContext.FileInfo> | opened files info |
error |
codioIDE.coachBot.CoachBotContext.ErrorInfo | current error info |
Type:
- Object
CoachBotCustomProxyOptions
Properties:
Name | Type | Description |
---|---|---|
provider |
string | proxy LLM provider |
endpoint |
string | optional LLM proxy https endpoint |
key |
string | optional LLM proxy access key |
model |
string | optional LLM proxy AI model |
temperature |
number | optional LLM proxy AI temperature. Range depend on a provider and a model. |
maxTokens |
number | optional LLM proxy maxTokens value. Range is 1-1024 |
apiVersion |
string | optional LLM proxy AI model api version |
Type:
- Object
CoachBotCustomRequestData
- Description:
- Custom request data. If userPrompt was specified it will be sent as user data otherwise messages will be sent.
- Source:
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
systemPrompt |
string | system prompt | |
userPrompt |
string | user prompt | |
messages |
codioIDE.coachBot.CoachBotMessage |
<optional> |
input messages - roles must alternate between USER and ASSISTANT - first message must use the USER role |
Custom request data. If userPrompt was specified it will be sent as user data otherwise messages will be sent.
Type:
- Object
CoachBotCustomRequestOptions
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
stream |
boolean |
<optional> |
true
|
stream response to coach bot |
preventMenu |
boolean |
<optional> |
false
|
allow user to prevent menu |
proxy |
codioIDE.coachBot.CoachBotCustomProxyOptions | optional custom ask proxy configuration |
Type:
- Object
CoachBotMessage
Properties:
Name | Type | Description |
---|---|---|
role |
codioIDE.coachBot.MESSAGE_ROLES | message role |
content |
string | message text |
Type:
- Object
LlmProxyDetails
Properties:
Name | Type | Description |
---|---|---|
provider |
string | proxy provider name |
endpoint |
string | proxy endpoint |
key |
string | proxy key |
Type:
- Object