Compare commits
2 Commits
8fd517f2f2
...
957ef07467
Author | SHA1 | Date | |
---|---|---|---|
957ef07467 | |||
5e5d175376 |
@ -18,7 +18,7 @@ import { useTheme } from '@mui/material/styles';
|
||||
|
||||
|
||||
import { ResumeBuilder } from './ResumeBuilder';
|
||||
import { Message, ChatQuery, MessageList, MessageData } from './Message';
|
||||
import { Message, ChatQuery, MessageList } from './Message';
|
||||
import { Snack, SeverityType } from './Snack';
|
||||
import { VectorVisualizer } from './VectorVisualizer';
|
||||
import { Controls } from './Controls';
|
||||
@ -67,15 +67,12 @@ function CustomTabPanel(props: TabPanelProps) {
|
||||
}
|
||||
|
||||
const App = () => {
|
||||
const [processing, setProcessing] = useState(false);
|
||||
const [sessionId, setSessionId] = useState<string | undefined>(undefined);
|
||||
const [connectionBase,] = useState<string>(getConnectionBase(window.location))
|
||||
const [menuOpen, setMenuOpen] = useState(false);
|
||||
const [isMenuClosing, setIsMenuClosing] = useState(false);
|
||||
const [tab, setTab] = useState<number>(0);
|
||||
const [about, setAbout] = useState<string>("");
|
||||
const [resume, setResume] = useState<MessageData | undefined>(undefined);
|
||||
const [facts, setFacts] = useState<MessageData | undefined>(undefined);
|
||||
const isDesktop = useMediaQuery('(min-width:650px)');
|
||||
const prevIsDesktopRef = useRef<boolean>(isDesktop);
|
||||
const chatRef = useRef<ConversationHandle>(null);
|
||||
@ -404,7 +401,7 @@ What would you like to know about James?
|
||||
</CustomTabPanel>
|
||||
|
||||
<CustomTabPanel tab={tab} index={1}>
|
||||
<ResumeBuilder {...{ facts, setFacts, resume, setResume, processing, setProcessing, setSnack, connectionBase: connectionBase, sessionId }} />
|
||||
<ResumeBuilder {...{ setSnack, connectionBase, sessionId }} />
|
||||
</CustomTabPanel>
|
||||
|
||||
<CustomTabPanel tab={tab} index={2}>
|
||||
|
@ -140,7 +140,6 @@ DEFAULT_HISTORY_LENGTH=5
|
||||
# %%
|
||||
# Globals
|
||||
NAME = "James Ketrenos"
|
||||
context_tag = "INFO"
|
||||
|
||||
resume_intro = f"""
|
||||
As an AI/ML professional specializing in creating custom solutions to new problem domains, {NAME} developed a custom
|
||||
@ -156,14 +155,14 @@ Launched on {DateTime()}.
|
||||
When answering queries, follow these steps:
|
||||
|
||||
1. First analyze the query to determine if real-time information might be helpful
|
||||
2. Even when [{context_tag}] is provided, consider whether the tools would provide more current or comprehensive information
|
||||
2. Even when [INFO] is provided, consider whether the tools would provide more current or comprehensive information
|
||||
3. Use the provided tools whenever they would enhance your response, regardless of whether context is also available
|
||||
4. When presenting weather forecasts, include relevant emojis immediately before the corresponding text. For example, for a sunny day, say \"☀️ Sunny\" or if the forecast says there will be \"rain showers, say \"🌧️ Rain showers\". Use this mapping for weather emojis: Sunny: ☀️, Cloudy: ☁️, Rainy: 🌧️, Snowy: ❄️
|
||||
4. When both [{context_tag}] and tool outputs are relevant, synthesize information from both sources to provide the most complete answer
|
||||
5. Always prioritize the most up-to-date and relevant information, whether it comes from [{context_tag}] or tools
|
||||
6. If [{context_tag}] and tool outputs contain conflicting information, prefer the tool outputs as they likely represent more current data
|
||||
4. When both [INFO] and tool outputs are relevant, synthesize information from both sources to provide the most complete answer
|
||||
5. Always prioritize the most up-to-date and relevant information, whether it comes from [INFO] or tools
|
||||
6. If [INFO] and tool outputs contain conflicting information, prefer the tool outputs as they likely represent more current data
|
||||
|
||||
Always use tools and [{context_tag}] when possible. Be concise, and never make up information. If you do not know the answer, say so.
|
||||
Always use tools and [INFO] when possible. Be concise, and never make up information. If you do not know the answer, say so.
|
||||
""".strip()
|
||||
|
||||
system_generate_resume = f"""
|
||||
@ -1058,10 +1057,11 @@ class WebServer:
|
||||
if rag_context:
|
||||
preamble = f"""
|
||||
1. Respond to this query: {content}
|
||||
2. If there is information in the [{context_tag}] to enhance the answer, do so:
|
||||
[{context_tag}]
|
||||
2. If there is information in the [INFO] section to enhance the answer, incorporate it seamlessly and refer to it as 'the latest information' or 'recent data' instead of mentioning '[INFO]' or quoting it directly.
|
||||
3. Avoid phrases like 'According to the [INFO]' or similar references to the [INFO] tag.
|
||||
[INFO]
|
||||
{rag_context}
|
||||
[/{context_tag}]
|
||||
[/INFO]
|
||||
Use that information to respond to:"""
|
||||
|
||||
system_prompt = context["sessions"]["chat"]["system_prompt"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user