Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(chat): new branch for AI chat #66

Merged
merged 3 commits into from
Jan 31, 2024

Conversation

ocornec
Copy link
Contributor

@ocornec ocornec commented Jan 29, 2024

Closes #

{{short description}}

Changelog

New

  • {{new thing}}

Changed

  • {{change thing}}

Removed

  • {{removed thing}}

Testing / Reviewing

{{ Add descriptions, steps or a checklist for how reviewers can verify this PR works or not }}

Copy link

netlify bot commented Jan 29, 2024

Deploy Preview for carbon-for-ai ready!

Name Link
🔨 Latest commit 40c710c
🔍 Latest deploy log https://app.netlify.com/sites/carbon-for-ai/deploys/65baccf278a1870008097df4
😎 Deploy Preview https://deploy-preview-66--carbon-for-ai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

</span>
</div>
</div>
<div class="test-section">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test section should only in the storybook code... if you want to change it to use controls you can see an example here how to use select: https://github.com/carbon-design-system/carbon-for-ibm-dotcom/blob/feat/cwc-storybook-7-vite/packages/carbon-web-components/src/components/tag/tag.stories.ts#L61 and storybook docs: https://storybook.js.org/docs/essentials/controls

/**
* string denoting the bot name, default: 'bot' but can be changed to 'Watson' or 'client assistant' or any other name
*/
@property({ type: String, attribute: 'agentname' })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@property({ type: String, attribute: 'agentname' })
@property({ type: String, attribute: 'agent-name' })

usually we seperate two words by a dash in properties. Anywhere agentname is used should be updated to agent-name

* string denoting the bot name, default: 'bot' but can be changed to 'Watson' or 'client assistant' or any other name
*/
@property({ type: String, attribute: 'agentname' })
agentname;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
agentname;
agentName;

* string denoting the unique behavior of the model designated by the user, appended to the private system prompt
*/
@property({ type: String, attribute: 'userprompt' })
userprompt;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
userprompt;
userPrompt;

/**
* string denoting the unique behavior of the model designated by the user, appended to the private system prompt
*/
@property({ type: String, attribute: 'userprompt' })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@property({ type: String, attribute: 'userprompt' })
@property({ type: String, attribute: 'user-prompt' })

same message as above with agent-name

/**
* TEST OPTION FOR API CONNECTIONS
*/
private _selectedapi = 'local';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private _selectedapi = 'local';
private _selectedAPI = 'local';

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this is only for testing can we move all of this into the storybook file chat.stories.ts

min-block-size: 300px;
}

.chat-messages {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all of the classes should be in this similar format.#{$c4ai-prefix}--chat-container, so for .chat-messages, .user-message and so on they should look like .#{$c4ai-prefix}--chat-messages

display: none;
}

.test-section {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this is just for testing we can create a chat.scss inside __stories__

// @ts-ignore
import styles from './chat.scss?inline';

//const { stablePrefix: c4aiPrefix } = settings;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can probably uncomment this when you update the classes to use the prefix

Copy link
Member

@ariellalgilmore ariellalgilmore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ariellalgilmore ariellalgilmore merged commit e1467c0 into carbon-design-system:main Jan 31, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants