| Prev | Next |
Chat with AI Model Assistant
The Model Chat facility allows you to send questions to an AI service provider if a connection to such a service has been configured for the model.
When selecting a chat group, the option 'Model Assistant' is presented if an AI connection is available. In this case, the message you type into the chat window is sent up to the AI service provider as a prompt. When the service provider responds to your prompt, the response is displayed in the chat window, with the name of the provider displayed beside the response as the author. So, if Gemini is configured, the author name displayed beside its response would be 'Gemini'.
Chat windows are not linked to any particular model element or diagram and may contain 'conversations' about many different topics. As such, the default behavior is to send to the AI service, only the current post rather than the entire chat. Sending posts relating to numerous topics could potentially 'confuse' the AI Service, resulting in a meaningless response.
If you wish to expand on a response from AI, you can begin your message with <> and then select the response you wish to reply to. This results in passing up the AI response and the previous prompt that AI was responding to, as context for the current prompt. For example, if you asked AI to sum 100 + 10, after it responds, you can then write '<> please add another 10'. Make sure to select the post you are replying to before pressing send.
Within a 'Model Assistant' chat, the following keywords are supported;
#diagram#, #element#, #elements# or a hyperlink to an element.
When using these keywords, a simple JSON representation of the target item is created and substituted for the keyword before being sent to the AI provider.
#diagram# will refer to the active diagram,
#elements# allows you to pass information for a selection in either a diagram or the browser.
#element# is context sensitive and #elements# will refer to either the diagram selection or project browser selection but only looks at elements or packages.
Included here, is an example of the data that is passed to the AI service.
When using a Hyperlink, #element# or #elements# the following properties are passed:
- Name, Notes, Language, Object Type, Tagged Values ( Name, Value ).
When using #diagram#, the following details are passed:
- Elements > ID, Name, Notes, Type, Width, Height, Top Left ( x, y ).
- Diagram > Name, Type.
- Connectors > Name, Type, Source ID, Target ID, Multiplicity (From, To)