AI Positron - I am not able to import chat
Oxygen general issues.
-
- Posts: 8
- Joined: Tue Apr 22, 2025 4:35 pm
AI Positron - I am not able to import chat
Hi,
Whenever I try to import any JSON file for AI Positron custom actions, I always get the following error. Can anyone help me?
[ {
"id" : "replace.bold.with.uicontrol",
"title" : "Replace bold with uicontrol",
"input-type" : "markup",
"type" : "replace-selection-with-fragment",
"context" : "Find where the bold element (<b>) has been used to mark up UI elements and change those instances by replacing the bold element with the uicontrol element (<uicontrol>). If you find some other content marked up with bold element, content that does not define UI elements, leave it unchanged. Also keep any other content unaltered.",
"examples" : [ {
"prompt" : "<b>Run</b>",
"completion" : "<uicontrol>Run</uicontrol>"
},
{
"prompt" : "text1 <b>Run</b> text2",
"completion" : "text1 <uicontrol>Run</uicontrol> text2"
}]
} ]
Whenever I try to import any JSON file for AI Positron custom actions, I always get the following error. Can anyone help me?
Screenshot 2025-04-22 at 7.08.48 PM.png
An example of JSON code that I tried uploading (I have tried with many files though):[ {
"id" : "replace.bold.with.uicontrol",
"title" : "Replace bold with uicontrol",
"input-type" : "markup",
"type" : "replace-selection-with-fragment",
"context" : "Find where the bold element (<b>) has been used to mark up UI elements and change those instances by replacing the bold element with the uicontrol element (<uicontrol>). If you find some other content marked up with bold element, content that does not define UI elements, leave it unchanged. Also keep any other content unaltered.",
"examples" : [ {
"prompt" : "<b>Run</b>",
"completion" : "<uicontrol>Run</uicontrol>"
},
{
"prompt" : "text1 <b>Run</b> text2",
"completion" : "text1 <uicontrol>Run</uicontrol> text2"
}]
} ]
You do not have the required permissions to view the files attached to this post.
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: AI Positron - I am not able to import chat
Hi,
There are two actions "Export chat" and "Import chat":
https://www.oxygenxml.com/doc/ug-addons ... xport_chat
So if you export a chat as a JSON file, you can later import it.
But in your case the JSON actually contains an AI action, not an exported chat.
https://www.oxygenxml.com/doc/ug-addons ... xport_chat
So in your case you should save the AI action in a folder somewhere on your disk and then go to the Oxygen Preferences->"Plugins / Oxygen AI Positron Assistant" page and it has an "Additional actions folder" where you can specify the folder from which AI Positron should load extra JSON files containing action definitions. After this, the custom AI actions should appear in the AI Positron Assistant chat view and you can call them from there.
Regards,
Radu
There are two actions "Export chat" and "Import chat":
https://www.oxygenxml.com/doc/ug-addons ... xport_chat
So if you export a chat as a JSON file, you can later import it.
But in your case the JSON actually contains an AI action, not an exported chat.
https://www.oxygenxml.com/doc/ug-addons ... xport_chat
So in your case you should save the AI action in a folder somewhere on your disk and then go to the Oxygen Preferences->"Plugins / Oxygen AI Positron Assistant" page and it has an "Additional actions folder" where you can specify the folder from which AI Positron should load extra JSON files containing action definitions. After this, the custom AI actions should appear in the AI Positron Assistant chat view and you can call them from there.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 8
- Joined: Tue Apr 22, 2025 4:35 pm
Re: AI Positron - I am not able to import chat
Thank you, Radu. After a restart and quitting Oxygen twice, and restarted the Positron, it fetched the file. Also, one thing that I learnt was I exported a chat and used the same file for placing my actions by replacing the existing chat. Because creating JSON file on my own did not work.
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: AI Positron - I am not able to import chat
Hi,
About this remark:
https://www.oxygenxml.com/doc/ug-addons ... ly_wp4_wxb
Some sample AI actions for experimenting can also be found here:
https://github.com/oxygenxml-incubator/ ... %20Actions
Regards,
Radu
About this remark:
Usually our recommended procedure to create new AI actions is to use the main menu "File->New" and in the New dialog wizard which shows up search for "AI Positron Custom Action" and you should find a new template for that.Because creating JSON file on my own did not work.
https://www.oxygenxml.com/doc/ug-addons ... ly_wp4_wxb
Some sample AI actions for experimenting can also be found here:
https://github.com/oxygenxml-incubator/ ... %20Actions
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service