-
Notifications
You must be signed in to change notification settings - Fork 367
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
coral-web: update assistant #248
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
misspia-cohere
requested review from
EugeneLightsOn,
malexw,
scottmx81,
tianjing-li and
a team
as code owners
June 19, 2024 21:46
misspia-cohere
had a problem deploying
to
development
June 19, 2024 21:46
— with
GitHub Actions
Failure
misspia-cohere
commented
Jun 19, 2024
misspia-cohere
had a problem deploying
to
development
June 19, 2024 21:50
— with
GitHub Actions
Failure
misspia-cohere
had a problem deploying
to
development
June 19, 2024 21:53
— with
GitHub Actions
Failure
misspia-cohere
force-pushed
the
pia/tlk-682-toolkiteno-update-agent
branch
from
June 19, 2024 21:54
304e5a1
to
e5ac49f
Compare
misspia-cohere
had a problem deploying
to
development
June 19, 2024 21:54
— with
GitHub Actions
Failure
misspia-cohere
commented
Jun 19, 2024
wujessica
approved these changes
Jun 20, 2024
src/interfaces/coral_web/src/components/Agents/UpdateAgentDrawer.tsx
Outdated
Show resolved
Hide resolved
src/interfaces/coral_web/src/components/Agents/UpdateAgentDrawer.tsx
Outdated
Show resolved
Hide resolved
src/interfaces/coral_web/src/components/Agents/UpdateAgentDrawer.tsx
Outdated
Show resolved
Hide resolved
src/interfaces/coral_web/src/components/Agents/UpdateAgentDrawer.tsx
Outdated
Show resolved
Hide resolved
knajjars
reviewed
Jun 20, 2024
src/interfaces/coral_web/src/components/Agents/UpdateAgentDrawer.tsx
Outdated
Show resolved
Hide resolved
knajjars
reviewed
Jun 20, 2024
src/interfaces/coral_web/src/components/Agents/UpdateAgentDrawer.tsx
Outdated
Show resolved
Hide resolved
knajjars
reviewed
Jun 20, 2024
knajjars
reviewed
Jun 20, 2024
I created a PR that addresses all the code feedback: #249 |
knajjars
approved these changes
Jun 20, 2024
address code feedback improvements
misspia-cohere
temporarily deployed
to
development
June 20, 2024 14:14
— with
GitHub Actions
Inactive
sanal-cohere
pushed a commit
that referenced
this pull request
Jun 21, 2024
* create new agent form * render agents list * link back to base agent page * perform post submission actions * move input labels outside of input borders * move submit button * gen client * factor out agent base form * check if agent name is unique * and deployment + env variables to agent form * add deployments * clean up * remove deployments dropdown * init agent page * create agent drawer * use agent form * add update agent request * add get agent request * fix rebase errors * remove model from agent form * add agent drawer to conversation * remove unused componenets * use new agent name for update success message * fix(toolkit): Address code feedback + improvements (#249) address code feedback improvements --------- Co-authored-by: Khalil Najjar <knajjars@gmail.com>
sanal-cohere
added a commit
that referenced
this pull request
Jun 21, 2024
* Initial commit for Compass Tool * coral-web: update first turn suggestions (#225) * Addressed comments on the previous commit * Added custom_context to parse and filters to search * Formatting changes * feat(assistant): Update conversation header (#229) * feat(assistant): Update conversation header * feat(assistant): Update conversation header * update tooltip * fix IconButton import * Setup: fix dependencies (#243) * feat(toolkit): show conversation list on with agents list (#231) * Setup: remove redundant dependency (#244) * Improve Auth guide (#235) improve auth guide * coral-web: create agent + agent base form (#212) * create new agent form * render agents list * link back to base agent page * perform post submission actions * move input labels outside of input borders * move submit button * gen client * factor out agent base form * use default content type * list custom agents * check if agent name is unique * and deployment + env variables to agent form * add deployments * clean up * add submit modal * push to new agent page on create success * only show available deployments * remove deployments dropdown * feat: List Assistants returned from API (#242) * feat: list agents from BE * Update src/interfaces/coral_web/src/components/Conversation/MessagingContainer.tsx Co-authored-by: misspia-cohere <140425731+misspia-cohere@users.noreply.github.com> --------- Co-authored-by: misspia-cohere <140425731+misspia-cohere@users.noreply.github.com> * nits --------- Co-authored-by: Khalil Najjar <knajjars@gmail.com> * Propagate should_store logic to the File upload logic (#247) should_store logic to the attach_files_to_messages * [backend] passing in agent when calling streaming chat (#237) * initial chat changes * need to test * done * Remove old test * default model for agents right now * Organizations DB models, CRUD and tests (#238) * Organizations initial commit * Organizations initial commit * Organizations initial commit - sync main * Organizations initial commit - sync main - blacked * Organizations initial commit - sync main - lint * Organizations initial commit - sync main - tests * Organizations initial commit - sync main - tests * Organizations initial commit - review fixes * Organizations initial commit - review fixes * Split up display name and name for Tools (#241) * CHange * change * coral-web: update assistant (#248) * create new agent form * render agents list * link back to base agent page * perform post submission actions * move input labels outside of input borders * move submit button * gen client * factor out agent base form * check if agent name is unique * and deployment + env variables to agent form * add deployments * clean up * remove deployments dropdown * init agent page * create agent drawer * use agent form * add update agent request * add get agent request * fix rebase errors * remove model from agent form * add agent drawer to conversation * remove unused componenets * use new agent name for update success message * fix(toolkit): Address code feedback + improvements (#249) address code feedback improvements --------- Co-authored-by: Khalil Najjar <knajjars@gmail.com> * feat(toolkit): add/remove recently used agents (#250) * feat(toolkit): add/remove recently used agents * merge main * Add a walkthrough guide of the toolkit (#251) * GUide * Chang * Change * Change * Update docs/walkthrough/walkthrough.md Co-authored-by: Luísa Moura <luisa@cohere.com> * Update walkthrough.md --------- Co-authored-by: Luísa Moura <luisa@cohere.com> * coral-web: fix agent info panel opening by default (#253) cast isEditAgentPanelOpen to boolean * [backend] enforce agent update with user-id (#246) * updates * remove client changes * remove logs * use better header user id check * fix validators * typo * Metrics: add middleware (#185) * Metrics: add middleware * add chat calls * merge * lint * make it async * add user id * add more fields * add retry and duration * add meta * comments * fix tests * improve error handling * rename fields * match spec * comments * clean code * only create loop when theres endpoint * add assistant id to chat * feat(toolkit): show assistant welcome message (#255) * feat(toolkit): show assistant welcome message * feat(toolkit): show assistant welcome message * frontend: Login, logout, and account creation (#179) * add login page components * Add Register page and hooks for auth * Add the register page and connect all the frontend elements * Redirect to /login if the token expires and clean up some console errors * Add error messages for failed logins * frontend: Add Single Sign-on to Toolkit (#227) * Add Google SSO login plus OpenID components * Dynamically set SSO login buttons and show or hide username and password based on auth_strategies --------- Co-authored-by: Tianjing Li <tianjinglimail@gmail.com> * fix startup event * Fix build errors and update the API client * Fix tests by adding missing env vars Add test OIDC_WELL_KNOWN_ENDPOINT var to fixtures * Add a walkthrough guide of the toolkit (#251) * GUide * Chang * Change * Change * Update docs/walkthrough/walkthrough.md Co-authored-by: Luísa Moura <luisa@cohere.com> * Update walkthrough.md --------- Co-authored-by: Luísa Moura <luisa@cohere.com> * coral-web: fix agent info panel opening by default (#253) cast isEditAgentPanelOpen to boolean * [backend] enforce agent update with user-id (#246) * updates * remove client changes * remove logs * use better header user id check * fix validators * typo * Metrics: add middleware (#185) * Metrics: add middleware * add chat calls * merge * lint * make it async * add user id * add more fields * add retry and duration * add meta * comments * fix tests * improve error handling * rename fields * match spec * comments * clean code * only create loop when theres endpoint * add assistant id to chat * feat(toolkit): show assistant welcome message (#255) * feat(toolkit): show assistant welcome message * feat(toolkit): show assistant welcome message --------- Co-authored-by: misspia-cohere <pia@cohere.com> Co-authored-by: Tianjing Li <tianjinglimail@gmail.com> Co-authored-by: Beatrix De Wilde <128378696+BeatrixCohere@users.noreply.github.com> Co-authored-by: Luísa Moura <luisa@cohere.com> Co-authored-by: misspia-cohere <140425731+misspia-cohere@users.noreply.github.com> Co-authored-by: Scott <146760070+scott-cohere@users.noreply.github.com> Co-authored-by: Khalil Najjar <knajjars@gmail.com> * fix(toolkit): UX/UI improvements (#257) * Add error troubleshooting (#262) * Update chat.py --------- Co-authored-by: Jessica Wu <jessica@cohere.ai> Co-authored-by: Khalil Najjar <knajjars@gmail.com> Co-authored-by: Luísa Moura <luisa@cohere.com> Co-authored-by: Tomeu <tomeu@cohere.com> Co-authored-by: Tianjing Li <tianjinglimail@gmail.com> Co-authored-by: misspia-cohere <140425731+misspia-cohere@users.noreply.github.com> Co-authored-by: Eugene P <144219719+EugeneLightsOn@users.noreply.github.com> Co-authored-by: Scott <146760070+scott-cohere@users.noreply.github.com> Co-authored-by: Beatrix De Wilde <128378696+BeatrixCohere@users.noreply.github.com> Co-authored-by: Alex W <alex@blinkenlights.ca> Co-authored-by: misspia-cohere <pia@cohere.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thank you for contributing to the Cohere Toolkit!
Screen.Recording.2024-06-19.at.17.43.52.mov
PR title: "area: description"
PR message: Delete this entire checklist and replace with
Add tests and docs: Please include testing and documentation for your changes
Lint and test: Run
make lint
andmake run-tests
AI Description
This PR introduces a new feature that allows users to update their knowledge agents and adds a left panel to the agent interface, displaying the base agent, a list of agents, and an "Add Agent" button.
New files:
src/interfaces/coral_web/src/components/Agents/CustomAgentButton.tsx
src/interfaces/coral_web/src/components/Agents/LeftPanel.tsx
src/interfaces/coral_web/src/components/Conversation/UpdateAgentDrawer.tsx
Modified files:
src/interfaces/coral_web/pnpm-lock.yaml
src/interfaces/coral_web/src/cohere-client/client.ts
src/interfaces/coral_web/src/components/Agents/AgentForm.tsx
src/interfaces/coral_web/src/components/Conversation/Header.tsx
src/interfaces/coral_web/src/components/Conversation/MessagingContainer.tsx
src/interfaces/coral_web/src/components/Conversation/index.tsx
src/interfaces/coral_web/src/components/Shared/Input/Input.tsx
src/interfaces/coral_web/src/hooks/agents.ts
src/interfaces/coral_web/src/hooks/session.ts
src/interfaces/coral_web/src/pages/agents/index.tsx
src/interfaces/coral_web/src/stores/slices/settingsSlice.ts
src/interfaces/coral_web/tailwind.config.js
Update Agent Functionality
The UpdateAgentDrawer component in
UpdateAgentDrawer.tsx
allows users to update their knowledge agents. It uses the useUpdateAgent hook fromagents.ts
to update the agent's information. The UpdateAgent function inclient.ts
makes the API request to update the agent.Agent Left Panel
The LeftPanel component in
LeftPanel.tsx
renders the left panel in the agent interface. It displays the base agent, a list of agents using the CustomAgentButton component, and an "Add Agent" button. The CustomAgentButton component renders a button to navigate to a user-created knowledge agent page.Other Changes
session.ts
to get the user ID.agents.ts
to get agent information.Header.tsx
to include a new "Update assistant" menu item and an "About assistant" menu item.MessagingContainer.tsx
to include a newisEditAgentDrawerOpen
prop.index.tsx
to include a newagentId
prop and render theUpdateAgentDrawer
component.Input.tsx
to include a newdisabled
prop.agents.ts
to include anomittedAgentId
parameter.index.tsx
to include a newagentId
prop.isEditAgentDrawerOpen
field to the initial state insettingsSlice.ts
.agent-drawer
sizes intailwind.config.js
.