Skip to content

Commit 4d2aae3

Browse files
committed
revise the term
1 parent 5a67d59 commit 4d2aae3

2 files changed

Lines changed: 10 additions & 12 deletions

File tree

backend/app/main.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,9 @@ def explain_topic():
103103
), 400
104104

105105
# Create a prompt for the AI to explain the topic
106-
prompt = f"""Explain '{topic}' in the context of '{search_term}' following this structure:
107-
1. If it's an abbreviation, what it stands for and its common meaning in software development
108-
2. How it's typically defined in technical documentation or Wikipedia
109-
3. Its specific relevance to {search_term} and why developers use this term in repositories
110-
Keep it concise but informative (1-2 sentences)."""
106+
prompt = f"""Explain '{topic}' in the context of '{search_term}'.
107+
If it's an abbreviation, what it stands for in '{search_term}'
108+
Keep it concise but informative (1-2 sentences)."""
111109

112110
try:
113111
# Create an event loop and run the async function

src/views/TopicHistogram.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -385,30 +385,30 @@ const TopicHistogram: FC = () => {
385385
<div className="modal-dialog modal-dialog-centered">
386386
<div className="modal-content">
387387
<div className="modal-header">
388-
<h5 className="modal-title">Google API Key Required</h5>
388+
<h5 className="modal-title">Google Gemini API Key Required</h5>
389389
<button
390390
type="button"
391391
className="btn-close"
392392
onClick={() => {
393393
setShowApiKeyModal(false);
394-
setSelectedTopicForExplanation(null); // Clear the selected topic if user cancels
394+
setSelectedTopicForExplanation(null);
395395
}}
396396
aria-label="Close"
397397
/>
398398
</div>
399399
<div className="modal-body">
400400
<div className="mb-3">
401-
<label htmlFor="apiKey" className="form-label">Google API Key</label>
401+
<label htmlFor="apiKey" className="form-label">Google Gemini API Key</label>
402402
<input
403403
type="password"
404404
className="form-control"
405405
id="apiKey"
406406
value={apiKey}
407407
onChange={(e) => setApiKey(e.target.value)}
408-
placeholder="Enter your Google API key"
408+
placeholder="Enter your Google Gemini API key"
409409
/>
410410
<div className="form-text">
411-
Your API key is required to get topic explanations. It is stored locally in your browser and is never shared with our servers.
411+
Your Google Gemini API key is required to get topic explanations. It is stored locally in your browser and is never shared with our servers.
412412
<br />
413413
<a href="https://ai.google.dev/" target="_blank" rel="noopener noreferrer">
414414
Get your API key from Google AI Studio
@@ -422,7 +422,7 @@ const TopicHistogram: FC = () => {
422422
className="btn btn-secondary"
423423
onClick={() => {
424424
setShowApiKeyModal(false);
425-
setSelectedTopicForExplanation(null); // Clear the selected topic if user cancels
425+
setSelectedTopicForExplanation(null);
426426
}}
427427
>
428428
Cancel
@@ -507,7 +507,7 @@ const TopicHistogram: FC = () => {
507507
alignItems: "center",
508508
justifyContent: "center"
509509
}}
510-
title={apiKey ? 'Change API Key' : 'Set API Key'}
510+
title={apiKey ? 'Change Gemini API Key' : 'Set Gemini API Key'}
511511
>
512512
<FaCog className="m-auto" />
513513
</button>

0 commit comments

Comments
 (0)