From f5d79eab7a8fdee79f9cb13ae40176ba21f6ac43 Mon Sep 17 00:00:00 2001 From: Daniel O'Connell Date: Fri, 3 May 2024 21:03:47 +0200 Subject: [PATCH 1/3] set 20 default followups --- app/components/Chatbot/index.tsx | 61 ++++++++++------------- app/components/SearchResults/Dropdown.tsx | 2 +- app/components/search.tsx | 2 +- app/routes/_index.tsx | 2 +- 4 files changed, 28 insertions(+), 39 deletions(-) diff --git a/app/components/Chatbot/index.tsx b/app/components/Chatbot/index.tsx index 12900acc..210fdb70 100644 --- a/app/components/Chatbot/index.tsx +++ b/app/components/Chatbot/index.tsx @@ -13,46 +13,35 @@ import Input from '~/components/Input' // to be replaced with actual pool questions const poolQuestions = [ + {title: 'Do people seriously worry about existential risk from AI?', pageid: '6953'}, + {title: 'Is AI safety about systems becoming malevolent or conscious?', pageid: '6194'}, + {title: 'When do experts think human-level AI will be created?', pageid: '5633'}, + {title: 'Why is AI alignment a hard problem?', pageid: '8163'}, { - title: 'What is AI Safety? - from pool', - pageid: '8486', + title: 'Why can’t we just “put the AI in a box” so that it can’t influence the outside world?', + pageid: '6176', }, { - title: 'How would the AI even get out in the world? -- from pool', - pageid: '7638', + title: 'What are the differences between AGI, transformative AI, and superintelligence?', + pageid: '5864', }, + {title: 'What are large language models?', pageid: '5864'}, + {title: "Why can't we just turn the AI off if it starts to misbehave?", pageid: '3119'}, + {title: 'What is instrumental convergence?', pageid: '897I'}, + {title: "What is Goodhart's law?", pageid: '8185'}, + {title: 'What is the orthogonality thesis?', pageid: '6568'}, + {title: 'How powerful would a superintelligence become?', pageid: '7755'}, + {title: 'Will AI be able to think faster than humans?', pageid: '8E41'}, + {title: "Isn't the real concern misuse?", pageid: '9B85'}, + {title: 'Are AIs conscious?', pageid: '8V5J'}, { - title: 'What is the AI alignment problem? -- from pool', - pageid: '8EL9', - }, - { - title: 'What are existential risks (x-risks)? -- from pool', - pageid: '89LL', - }, - { - title: "Isn't the real concern misuse? -- from pool", - pageid: '9B85', - }, - { - title: "Aren't there easy solutions to AI alignment? -- from pool", - pageid: '6172', - }, - { - title: 'Will we ever build superintelligence? -- from pool', - pageid: '7565', - }, - { - title: 'Will the first AGI be an LLM? -- from pool', - pageid: '85E2', - }, - { - title: 'Why not just raise AI like kids? -- from pool', - pageid: '93R9', - }, - { - title: 'Why is AI alignment a hard problem? -- from pool', - pageid: '8163', + title: + 'What are the differences between a singularity, an intelligence explosion, and a hard takeoff?', + pageid: '8IHO', }, + {title: 'What is an intelligence explosion?', pageid: '6306'}, + {title: 'How might AGI kill people?', pageid: '5943'}, + {title: 'What is a "warning shot"?', pageid: '7748'}, ] const MIN_SIMILARITY = 0.85 @@ -105,7 +94,7 @@ const QuestionInput = ({initial, onChange, onAsk}: QuestionInputProps) => { ) } -export const WidgetStampy = () => { +export const WidgetStampy = ({className}: {className?: string}) => { const [question, setQuestion] = useState('') const navigate = useNavigate() const questions = [ @@ -116,7 +105,7 @@ export const WidgetStampy = () => { const stampyUrl = (question: string) => `/chat/?question=${question.trim()}` return ( -
+

Questions?

Ask Stampy, our chatbot, any question about AI safety

diff --git a/app/components/SearchResults/Dropdown.tsx b/app/components/SearchResults/Dropdown.tsx index 83430124..2caac3cf 100644 --- a/app/components/SearchResults/Dropdown.tsx +++ b/app/components/SearchResults/Dropdown.tsx @@ -27,7 +27,7 @@ export const SearchResults = ({results}: {results: SearchResultsProps[]}) => { const noResults = results.length === 0 if (noResults) { return ( -
+
No results found
) diff --git a/app/components/search.tsx b/app/components/search.tsx index c3e3268e..ca776976 100644 --- a/app/components/search.tsx +++ b/app/components/search.tsx @@ -39,7 +39,7 @@ export default function Search({limitFromUrl}: Props) { {isPendingSearch && results.length == 0 && (
Searching for questions...
)} - {searchPhrase && showResults && ( + {!isPendingSearch && searchPhrase && showResults && ( ({ title: r.title, diff --git a/app/routes/_index.tsx b/app/routes/_index.tsx index f2fd6887..83492dd2 100644 --- a/app/routes/_index.tsx +++ b/app/routes/_index.tsx @@ -45,7 +45,7 @@ export default function App() {
- +

Advanced sections

From 235ff71f961566b9db67ae1f73c2982432aca034 Mon Sep 17 00:00:00 2001 From: Daniel O'Connell Date: Fri, 3 May 2024 21:19:04 +0200 Subject: [PATCH 2/3] set model via url param --- app/routes/chat.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/app/routes/chat.tsx b/app/routes/chat.tsx index c44adf83..3b07e93b 100644 --- a/app/routes/chat.tsx +++ b/app/routes/chat.tsx @@ -1,4 +1,4 @@ -import {useState} from 'react' +import {useEffect, useState} from 'react' import {ShouldRevalidateFunction, useSearchParams} from '@remix-run/react' import SettingsIcon from '~/components/icons-generated/Settings' import Page from '~/components/Page' @@ -13,12 +13,16 @@ export default function App() { const [params] = useSearchParams() const [showSettings, setShowSettings] = useState(false) const clickDetectorRef = useOutsideOnClick(() => setShowSettings(false)) - const [chatSettings, setChatSettings] = useState({ - mode: 'default', - completions: 'gpt-3.5-turbo', - } as ChatSettings) + const [chatSettings, setChatSettings] = useState({mode: 'default'} as ChatSettings) const question = params.get('question') || undefined + useEffect(() => { + setChatSettings( + (settings) => + ({...settings, completions: params.get('model') || settings.completions}) as ChatSettings + ) + }, [params]) + const ModeButton = ({name, mode}: {name: string; mode: Mode}) => (