Skip to content

Commit

Permalink
fix: Anthropic plugin config updated with better file structure (#36223)
Browse files Browse the repository at this point in the history
## Description

Reverting the Anthropic file structure to the previous structure. This
also means the UI will get updated to the new shared design.


Fixes #35485

## Automation

/ok-to-test tags="@tag.All"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]
> 🔴 🔴 🔴 Some tests have failed.
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/10806310053>
> Commit: b7a7184
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10806310053&attempt=2&selectiontype=test&testsstatus=failed&specsstatus=fail"
target="_blank">Cypress dashboard</a>.
> Tags: @tag.All
> Spec: 
> The following are new failures, please fix them before merging the PR:
<ol>
>
<li>cypress/e2e/Regression/ClientSide/Debugger/Widget_property_navigation_spec.ts
>
<li>cypress/e2e/Regression/ClientSide/OneClickBinding/PropertyControl_spec.ts</ol>
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master"
target="_blank">List of identified flaky tests</a>.
> <hr>Wed, 11 Sep 2024 08:07:04 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Introduced a new chat interface configuration for AI-driven
interactions, enhancing user engagement with dynamic input fields.
- Added a new configuration for vision capabilities, allowing users to
interact with vision-based AI models through a structured interface.

- **Changes**
- Simplified the editor's configuration by renaming sections and
removing unnecessary controls, streamlining the user experience.
- Updated file management structure to enhance modularity with external
references to configuration files.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
albinAppsmith committed Sep 11, 2024
1 parent a182e74 commit cd7b66f
Show file tree
Hide file tree
Showing 3 changed files with 275 additions and 310 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
{
"identifier": "CHAT",
"controlType": "SECTION_V2",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'CHAT'}}"
},
"children": [
{
"controlType": "DOUBLE_COLUMN_ZONE",
"children": [
{
"label": "Models",
"tooltipText": "Select the model for response generation",
"subtitle": "ID of the model to use.",
"isRequired": true,
"propertyName": "chat_model_id",
"configProperty": "actionConfiguration.formData.chatModel.data",
"controlType": "DROP_DOWN",
"initialValue": "",
"options": [],
"placeholderText": "All models will be fetched.",
"fetchOptionsConditionally": true,
"setFirstOptionAsDefault": true,
"alternateViewTypes": ["json"],
"conditionals": {
"enable": "{{true}}",
"fetchDynamicValues": {
"condition": "{{actionConfiguration.formData.command.data === 'CHAT'}}",
"config": {
"params": {
"requestType": "CHAT_MODELS",
"displayType": "DROP_DOWN"
}
}
}
}
},
{
"label": "Max Tokens",
"tooltipText": "The maximum number of tokens to generate in the chat completion.",
"subtitle": "The maximum number of tokens to generate in the chat completion.",
"Description": "Put a positive integer value",
"configProperty": "actionConfiguration.formData.maxTokens",
"controlType": "INPUT_TEXT",
"initialValue": "256",
"isRequired": true,
"dataType": "NUMBER",
"customStyles": {
"width": "270px",
"minWidth": "270px"
}
}
]
},
{
"controlType": "SINGLE_COLUMN_ZONE",
"children": [
{
"label": "System Prompt",
"Description": "Provide additional instructions for the AI model as system prompt",
"subtitle": "Provide additional instructions for the AI model as system prompt",
"configProperty": "actionConfiguration.formData.systemPrompt.data",
"controlType": "QUERY_DYNAMIC_TEXT",
"placeholderText": "Write some text or use {{ }} to reference a dynamic text value",
"initialValue": "",
"isRequired": false,
"customStyles": {
"width": "590px",
"minWidth": "400px"
}
},
{
"label": "Messages",
"tooltipText": "Ask a question",
"subtitle": "A list of messages comprising the conversation so far.",
"propertyName": "messages",
"isRequired": true,
"configProperty": "actionConfiguration.formData.messages.data",
"controlType": "ARRAY_FIELD",
"addMoreButtonLabel": "Add message",
"alternateViewTypes": ["json"],
"schema": [
{
"label": "Role",
"key": "role",
"controlType": "DROP_DOWN",
"initialValue": "Human",
"options": [
{
"label": "Human",
"value": "Human"
},
{
"label": "Assistant",
"value": "Assistant"
}
]
},
{
"label": "Content",
"key": "content",
"controlType": "QUERY_DYNAMIC_INPUT_TEXT",
"placeholderText": "{{ UserInput.text }}"
}
]
}
]
},
{
"controlType": "DOUBLE_COLUMN_ZONE",
"children": [
{
"label": "Temperature",
"tooltipText": "Put a value between 0 and 1",
"Description": "Put a value between 0 and 1",
"subtitle": "Defaults to 1. Ranges from 0 to 1. Use temp closer to 0 for analytical / multiple choice, and closer to 1 for creative and generative tasks.",
"configProperty": "actionConfiguration.formData.temperature",
"controlType": "INPUT_TEXT",
"dataType": "NUMBER",
"initialValue": "1",
"isRequired": false,
"customStyles": {
"width": "270px",
"minWidth": "270px"
}
}
]
}
]
}
Loading

0 comments on commit cd7b66f

Please sign in to comment.