From 2bfe31818fd1347bef9006870ff135f9b71d5ced Mon Sep 17 00:00:00 2001 From: Mike Jensen Date: Mon, 15 May 2023 12:18:59 -0600 Subject: [PATCH 1/4] Rename `ChatGPT` to `GPT4` ChatGPT is a user friendly name, but is technically inaccurate. --- lib/ai/chat_test.go | 2 +- lib/ai/prompt.go | 2 +- web/packages/teleport/src/Assist/Chat/ChatItem/ChatItem.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ai/chat_test.go b/lib/ai/chat_test.go index c1673d25ad88a..a1355b2c018f7 100644 --- a/lib/ai/chat_test.go +++ b/lib/ai/chat_test.go @@ -128,7 +128,7 @@ func TestChat_Complete(t *testing.T) { require.NoError(t, err) expectedResp := &Message{Role: "assistant", - Content: "Hey, I'm Teleport - a powerful tool that can assist you in managing your Teleport cluster via ChatGPT.", + Content: "Hey, I'm Teleport - a powerful tool that can assist you in managing your Teleport cluster via GPT4.", Idx: 0, } require.Equal(t, expectedResp, msg) diff --git a/lib/ai/prompt.go b/lib/ai/prompt.go index 3dfd23fbe53a6..9e756c4c76bbd 100644 --- a/lib/ai/prompt.go +++ b/lib/ai/prompt.go @@ -21,7 +21,7 @@ import "fmt" const promptSummarizeTitle = `You will be given a message. Create a short summary of that message. Respond only with summary, nothing else.` -const initialAIResponse = `Hey, I'm Teleport - a powerful tool that can assist you in managing your Teleport cluster via ChatGPT.` +const initialAIResponse = `Hey, I'm Teleport - a powerful tool that can assist you in managing your Teleport cluster via GPT4.` const promptExtractInstruction = `If the input is a request to complete a task on a server, try to extract the following information: - A Linux shell command diff --git a/web/packages/teleport/src/Assist/Chat/ChatItem/ChatItem.tsx b/web/packages/teleport/src/Assist/Chat/ChatItem/ChatItem.tsx index 8b70a79f1510c..e135b5f4e3b45 100644 --- a/web/packages/teleport/src/Assist/Chat/ChatItem/ChatItem.tsx +++ b/web/packages/teleport/src/Assist/Chat/ChatItem/ChatItem.tsx @@ -300,7 +300,7 @@ export function ExampleChatItem() { Hey {ctx.storeUser.state.username}, I'm Teleport - a powerful tool that - can assist you in managing your Teleport cluster via ChatGPT.
+ can assist you in managing your Teleport cluster via Open AI's GPT4.

Start a new chat with me on the left to get started! Here's some of the things I can do: From d3558cb838c8cfb1c0967228e7b39d286e9e5ef3 Mon Sep 17 00:00:00 2001 From: Mike Jensen Date: Mon, 15 May 2023 12:24:41 -0600 Subject: [PATCH 2/4] Apply suggestions from code review Co-authored-by: Reed Loden --- lib/ai/chat_test.go | 2 +- lib/ai/prompt.go | 2 +- web/packages/teleport/src/Assist/Chat/ChatItem/ChatItem.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ai/chat_test.go b/lib/ai/chat_test.go index a1355b2c018f7..19aacd5be2368 100644 --- a/lib/ai/chat_test.go +++ b/lib/ai/chat_test.go @@ -128,7 +128,7 @@ func TestChat_Complete(t *testing.T) { require.NoError(t, err) expectedResp := &Message{Role: "assistant", - Content: "Hey, I'm Teleport - a powerful tool that can assist you in managing your Teleport cluster via GPT4.", + Content: "Hey, I'm Teleport - a powerful tool that can assist you in managing your Teleport cluster via OpenAI GPT-4.", Idx: 0, } require.Equal(t, expectedResp, msg) diff --git a/lib/ai/prompt.go b/lib/ai/prompt.go index 9e756c4c76bbd..df3b46dffd5d5 100644 --- a/lib/ai/prompt.go +++ b/lib/ai/prompt.go @@ -21,7 +21,7 @@ import "fmt" const promptSummarizeTitle = `You will be given a message. Create a short summary of that message. Respond only with summary, nothing else.` -const initialAIResponse = `Hey, I'm Teleport - a powerful tool that can assist you in managing your Teleport cluster via GPT4.` +const initialAIResponse = `Hey, I'm Teleport - a powerful tool that can assist you in managing your Teleport cluster via OpenAI GPT-4.` const promptExtractInstruction = `If the input is a request to complete a task on a server, try to extract the following information: - A Linux shell command diff --git a/web/packages/teleport/src/Assist/Chat/ChatItem/ChatItem.tsx b/web/packages/teleport/src/Assist/Chat/ChatItem/ChatItem.tsx index e135b5f4e3b45..35fc45631e0ed 100644 --- a/web/packages/teleport/src/Assist/Chat/ChatItem/ChatItem.tsx +++ b/web/packages/teleport/src/Assist/Chat/ChatItem/ChatItem.tsx @@ -300,7 +300,7 @@ export function ExampleChatItem() { Hey {ctx.storeUser.state.username}, I'm Teleport - a powerful tool that - can assist you in managing your Teleport cluster via Open AI's GPT4.
+ can assist you in managing your Teleport cluster via OpenAI GPT-4.

Start a new chat with me on the left to get started! Here's some of the things I can do: From 41b438940941d5958cbbc185e8da95028567f27f Mon Sep 17 00:00:00 2001 From: Mike Jensen Date: Mon, 15 May 2023 12:30:47 -0600 Subject: [PATCH 3/4] Lint fix --- web/packages/teleport/src/Assist/Chat/ChatItem/ChatItem.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/packages/teleport/src/Assist/Chat/ChatItem/ChatItem.tsx b/web/packages/teleport/src/Assist/Chat/ChatItem/ChatItem.tsx index 35fc45631e0ed..7475f09577789 100644 --- a/web/packages/teleport/src/Assist/Chat/ChatItem/ChatItem.tsx +++ b/web/packages/teleport/src/Assist/Chat/ChatItem/ChatItem.tsx @@ -300,7 +300,8 @@ export function ExampleChatItem() { Hey {ctx.storeUser.state.username}, I'm Teleport - a powerful tool that - can assist you in managing your Teleport cluster via OpenAI GPT-4.
+ can assist you in managing your Teleport cluster via OpenAI GPT-4. +

Start a new chat with me on the left to get started! Here's some of the things I can do: From a628239c556ee99bcb24155655b1afe2741a9082 Mon Sep 17 00:00:00 2001 From: Reed Loden Date: Mon, 15 May 2023 22:33:29 -0700 Subject: [PATCH 4/4] Additional ChatGPT --> OpenAI GPT-4 fixes --- .../design/src/SVGIcon/{ChatGPT.tsx => OpenAI.tsx} | 2 +- web/packages/design/src/SVGIcon/index.ts | 2 +- .../teleport/src/Navigation/NavigationSwitcher.tsx | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) rename web/packages/design/src/SVGIcon/{ChatGPT.tsx => OpenAI.tsx} (97%) diff --git a/web/packages/design/src/SVGIcon/ChatGPT.tsx b/web/packages/design/src/SVGIcon/OpenAI.tsx similarity index 97% rename from web/packages/design/src/SVGIcon/ChatGPT.tsx rename to web/packages/design/src/SVGIcon/OpenAI.tsx index 15b5a8e127a7b..c36e4f8755130 100644 --- a/web/packages/design/src/SVGIcon/ChatGPT.tsx +++ b/web/packages/design/src/SVGIcon/OpenAI.tsx @@ -20,7 +20,7 @@ import { SVGIcon } from 'design/SVGIcon/SVGIcon'; import type { SVGIconProps } from './common'; -export function ChatGPTIcon({ size = 20, fill }: SVGIconProps) { +export function OpenAIIcon({ size = 20, fill }: SVGIconProps) { return ( diff --git a/web/packages/design/src/SVGIcon/index.ts b/web/packages/design/src/SVGIcon/index.ts index b26c3fd92951c..e8b56b7a6279b 100644 --- a/web/packages/design/src/SVGIcon/index.ts +++ b/web/packages/design/src/SVGIcon/index.ts @@ -21,7 +21,6 @@ export { ApplicationsIcon } from './Applications'; export { AuditLogIcon } from './AuditLog'; export { AuthConnectorsIcon } from './AuthConnectors'; export { AWSIcon } from './AWS'; -export { ChatGPTIcon } from './ChatGPT'; export { ChatIcon } from './Chat'; export { ChevronRightIcon } from './ChevronRight'; export { ChevronDownIcon } from './ChevronDown'; @@ -37,6 +36,7 @@ export { LabelIcon } from './Label'; export { LockIcon } from './Lock'; export { LogoutIcon } from './Logout'; export { ManageClustersIcon } from './ManageClusters'; +export { OpenAIIcon } from './OpenAI'; export { PlusIcon } from './Plus'; export { RemoteCommandIcon } from './RemoteCommand'; export { RolesIcon } from './Roles'; diff --git a/web/packages/teleport/src/Navigation/NavigationSwitcher.tsx b/web/packages/teleport/src/Navigation/NavigationSwitcher.tsx index c04913606e35b..d8fceb9c26636 100644 --- a/web/packages/teleport/src/Navigation/NavigationSwitcher.tsx +++ b/web/packages/teleport/src/Navigation/NavigationSwitcher.tsx @@ -20,7 +20,7 @@ import styled, { useTheme } from 'styled-components'; import { ChevronDownIcon } from 'design/SVGIcon/ChevronDown'; import { useLocalStorage } from 'shared/hooks/useLocalStorage'; -import { ChatGPTIcon } from 'design/SVGIcon/ChatGPT'; +import { OpenAIIcon } from 'design/SVGIcon/OpenAI'; import { useHistory, useLocation } from 'react-router'; @@ -295,10 +295,11 @@ export function NavigationSwitcher(props: NavigationSwitcherProps) { New! {' '} - Connect Teleport to ChatGPT and try out our new Assist integration + Connect Teleport to OpenAI GPT-4 and try out our new Assist + integration - + +