You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Configures an AI application with system prompt, tools, and RAG
242
+
```json
243
+
{
244
+
"ID" : "aia",
245
+
"djClassName" : "com.dashjoin.ai.AIApp",
246
+
"systemPrompt" : "You are a helpful assistant",
247
+
"tools" : [ "time:get_current_time" ],
248
+
"model" : "mistral",
249
+
"documents" : [ "rag.txt" ]
250
+
}
251
+
```
218
252
## Configuration
219
253
### login configuration
220
254
Login configuration for ACME Corp. App with a specific login screen background image. Users can choose between the 'de' and 'en' locales. The default is the browser locale.
Copy file name to clipboardExpand all lines: dashjoin-docs/docs/appendix-widgets.md
+5-15Lines changed: 5 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -379,32 +379,22 @@ Visualizes 'expression' as a table. The 'properties' field contains an object wh
379
379
}
380
380
```
381
381
## aichat widget
382
-
chat widget that allows you to react to user inputs and file uploads. this example answers (without AI) by simply repeating what the user asks.
382
+
chat widget that allows you to react to user inputs and file uploads. this example answers (without AI) by simply repeating what the user asks. the chat is initialized with a simple message
"expression" : "{'messages': [{'role': 'assistant', 'content': 'I am a parrot'}]}",
386
387
"widget" : "aichat"
387
388
}
388
389
```
389
390
## aichat widget
390
-
chat widget that allows you to react to user inputs and file uploads. this example chats with OpenAI's gpt-4o-mini model. The API key must be provided using the 'openai' credentials in the function catalog. The onChat callback passes messages (the chat history) and the new user query to the $chat function. The widget is configured using 'expression'. This expression specifies the initial messages - in this case the system message containing the system prompt
391
+
chat widget that allows you to react to user inputs and file uploads. this example calls a AIApp function called aia
391
392
```json
392
393
{
393
-
"onChat" : "/* called when a new question is entered in the chat */\n$chat('https://api.openai.com/v1/chat/completions', query, messages, [], {'model':'gpt-4o-mini'}, {'Authorization': 'openai', 'dj-timeout-seconds': 60})",
394
-
"expression" : "/* initial chat state with system prompt in messages */\n{'messages': [{'role': 'system', 'content': 'always answer in a funny way'}]}",
/* initial chat state with system prompt in messages */
406
-
{'messages': [{'role': 'system', 'content': 'always answer in a funny way'}]}
407
-
```
408
398
## analytics widget
409
399
displays the results of a SQL query as a chart or table. Allows placing filters on the widget that the user can set when viewing the widget. The database, table, columns, and filter fields determine the SQL query: in this case, it is 'select user, count(ID) from REQUESTS where submitted >= ?' on the database 'sqlite'. Possible filter input widgets are: text, slider, switch, date, select, and selectmultiple.
Copy file name to clipboardExpand all lines: llms.txt
+46-5Lines changed: 46 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -374,19 +374,19 @@ CODE: {
374
374
}
375
375
376
376
TITLE: aichat widget
377
-
DESCRIPTION: chat widget that allows you to react to user inputs and file uploads. this example answers (without AI) by simply repeating what the user asks.
377
+
DESCRIPTION: chat widget that allows you to react to user inputs and file uploads. this example answers (without AI) by simply repeating what the user asks. the chat is initialized with a simple message
"expression" : "{'messages': [{'role': 'assistant', 'content': 'I am a parrot'}]}",
381
382
"widget" : "aichat"
382
383
}
383
384
384
385
TITLE: aichat widget
385
-
DESCRIPTION: chat widget that allows you to react to user inputs and file uploads. this example chats with OpenAI's gpt-4o-mini model. The API key must be provided using the 'openai' credentials in the function catalog. The onChat callback passes messages (the chat history) and the new user query to the $chat function. The widget is configured using 'expression'. This expression specifies the initial messages - in this case the system message containing the system prompt
386
+
DESCRIPTION: chat widget that allows you to react to user inputs and file uploads. this example calls a AIApp function called aia
386
387
LANGUAGE: json
387
388
CODE: {
388
-
"onChat" : "/* called when a new question is entered in the chat */\n$chat('https://api.openai.com/v1/chat/completions', query, messages, [], {'model':'gpt-4o-mini'}, {'Authorization': 'openai', 'dj-timeout-seconds': 60})",
389
-
"expression" : "/* initial chat state with system prompt in messages */\n{'messages': [{'role': 'system', 'content': 'always answer in a funny way'}]}",
DESCRIPTION: Configures an AI application with system prompt, tools, and RAG
1017
+
FILE: model/dj-function/aia.json
1018
+
LANGUAGE: json
1019
+
CODE: {
1020
+
"ID" : "aia",
1021
+
"djClassName" : "com.dashjoin.ai.AIApp",
1022
+
"systemPrompt" : "You are a helpful assistant",
1023
+
"tools" : [ "time:get_current_time" ],
1024
+
"model" : "mistral",
1025
+
"documents" : [ "rag.txt" ]
1026
+
}
1027
+
992
1028
TITLE: login configuration
993
1029
DESCRIPTION: Login configuration for ACME Corp. App with a specific login screen background image. Users can choose between the 'de' and 'en' locales. The default is the browser locale.
994
1030
FILE: assets/logincfg.json
@@ -1307,6 +1343,11 @@ DESCRIPTION: Lookup the text in the translation file and return the match for th
1307
1343
LANGUAGE: jsonata
1308
1344
CODE: $translate('ra.action.select_all_button')
1309
1345
1346
+
TITLE: sse
1347
+
DESCRIPTION: Calls the AIApp function called aia with messages. Use only in the AIChat widget's onChat expression
0 commit comments