-
Notifications
You must be signed in to change notification settings - Fork 886
readme commit #48
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
base: main
Are you sure you want to change the base?
readme commit #48
Changes from 7 commits
34af074
2c95acd
251d4df
dfd703d
c2b1987
2fb33fe
1e13e8e
dc8a90a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,79 @@ | ||||||
<img width="3188" height="1202" alt="frame (3)" src="https://github.com/user-attachments/assets/517ad8e9-ad22-457d-9538-a9e62d137cd7" /> | ||||||
|
||||||
|
||||||
# [SHIKKARI_SHAMBU] 🎯 | ||||||
|
||||||
|
||||||
## Basic Details | ||||||
### Team Name: [Swath] | ||||||
|
||||||
|
||||||
### Team Members | ||||||
- Team Lead: [Nandana Krishna] - [College of Engineering Attingal] | ||||||
- Member 2: [Suhana Salim] - [College of Engineering Attingal] | ||||||
|
||||||
### Project Description | ||||||
[Shikkari Shambu is an ai which reply only one answer for all questions. It elegantly cuts through the noise of information overload by providing a single, universally applicable answer to any and every question, thereby simplifying life for everyone.] | ||||||
|
||||||
### The Problem (that doesn't exist) | ||||||
[In todays world we are facing anxiety for finding answers for the question which we are repeatedly asked] | ||||||
### The Solution (that nobody asked for) | ||||||
[Through single answer for the all question we can reduce our anxiety and also to gain the confidence of shikkari shambu to spit out same answer for different question] | ||||||
|
||||||
## Technical Details | ||||||
### Technologies/Components Used | ||||||
For Software: | ||||||
- [HTML, CSS, JavaScript] | ||||||
- | ||||||
|
||||||
For Hardware: | ||||||
- [List main components] | ||||||
- [List specifications] | ||||||
- [List tools required] | ||||||
|
||||||
### Implementation | ||||||
For Software:VS code,gitHUB | ||||||
# Installation | ||||||
[commands] | ||||||
|
||||||
# Run | ||||||
[commands] | ||||||
|
||||||
### Project Documentation | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Fix heading level increment violation. The markdown linter flagged that heading levels should only increment by one level at a time. Line 42 jumps from h1 to h3. -### Project Documentation
+## Project Documentation 📝 Committable suggestion
Suggested change
🧰 Tools🪛 markdownlint-cli2 (0.17.2)42-42: Heading levels should only increment by one level at a time (MD001, heading-increment) 🤖 Prompt for AI Agents
|
||||||
For Software: | ||||||
|
||||||
# Screenshots (Add at least 3) | ||||||
|
||||||
## Shikkari's Room | ||||||
|
||||||
<img width="1024" height="512" alt=" Shikkari's Room" src="Screenshot 2025-08-02 162929.png" /> | ||||||
|
||||||
## Shikkari's Room | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Fix duplicate headings and spacing issues. The markdown linter flagged multiple spaces after hash symbols and duplicate heading content. -## Shikkari's Room
+## Shikkari's Room - Interface
<img width="1024" height="512" alt=" Shikkari's Room" src="Screenshot 2025-08-02 162956.png" />
-## Shikkari's Room
+## Shikkari's Room - Chat View Also applies to: 55-55 🧰 Tools🪛 markdownlint-cli2 (0.17.2)51-51: Multiple spaces after hash on atx style heading (MD019, no-multiple-space-atx) 51-51: Multiple headings with the same content (MD024, no-duplicate-heading) 🤖 Prompt for AI Agents
|
||||||
|
||||||
<img width="1024" height="512" alt=" Shikkari's Room" src="Screenshot 2025-08-02 162956.png" /> | ||||||
|
||||||
## Shikkari's Room | ||||||
|
||||||
<img width="1024" height="512" alt=" Shikkari's Room" src="Screenshot 2025-08-02 163029.png" /> | ||||||
|
||||||
### Project Demo | ||||||
# Video | ||||||
<video controls> | ||||||
<source src="https://drive.google.com/file/d/1niV2rg52ViF26yvu7xMeJjOjpxqLjQqk/view?usp=sharing" type="video/mp4"> | ||||||
</video> | ||||||
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
The video shows how shikkari answers to our questions. | ||||||
|
||||||
|
||||||
## Team Contributions | ||||||
- [Suhana Salim]: [Front end] | ||||||
- [Nandana Krishna]: [Front end,Presentation] | ||||||
|
||||||
|
||||||
--- | ||||||
Made with ❤️ at TinkerHub Useless Projects | ||||||
|
||||||
 | ||||||
 | ||||||
|
||||||
|
||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> | ||
<title>Shikari Shambu Chat</title> | ||
<link rel="stylesheet" href="style1.css" /> | ||
</head> | ||
<body> | ||
<div id="chat-container"> | ||
<div id="chat-header"> | ||
<img src="shikkudp.png" alt="Shambu" id="pfp"> | ||
<div id="header-title"> | ||
<h2>Shikari Shambu</h2> | ||
<span>Ask anything (but don’t expect a real answer!)</span> | ||
</div> | ||
</div> | ||
<div id="chat-box"></div> | ||
<div id="input-area"> | ||
<input type="text" id="user-input" placeholder="Ask something..."/> | ||
<button id="send-btn">Send</button> | ||
</div> | ||
</div> | ||
<script src="script1.js"></script> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,101 @@ | ||||||||||||||||||||||||||
const chatBox = document.getElementById('chat-box'); | ||||||||||||||||||||||||||
const userInput = document.getElementById('user-input'); | ||||||||||||||||||||||||||
const sendBtn = document.getElementById('send-btn'); | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
// WARNING: For demonstration only — do NOT expose keys in real apps | ||||||||||||||||||||||||||
const API_KEY = 'AIzaSyAh0RHJ_zONdXdpO047Zr2ij2JbqKE2ynw'; | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CRITICAL: Remove exposed API key from client-side code. The API key is exposed in client-side JavaScript, which is a serious security vulnerability. Anyone can view and abuse this key. Move the API key to a backend service or environment variables: -// WARNING: For demonstration only — do NOT expose keys in real apps
-const API_KEY = 'AIzaSyAh0RHJ_zONdXdpO047Zr2ij2JbqKE2ynw';
-// FIXED: The URL string must be enclosed in backticks (`) to work as a template literal.
-const API_URL = `https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=${API_KEY}`;
+// API calls should go through your backend server
+const API_URL = '/api/chat'; // Your backend endpoint Set up a backend server to handle API calls securely with the key stored server-side. 📝 Committable suggestion
Suggested change
🧰 Tools🪛 Gitleaks (8.27.2)6-6: Uncovered a GCP API key, which could lead to unauthorized access to Google Cloud services and data breaches. (gcp-api-key) 🤖 Prompt for AI Agents
|
||||||||||||||||||||||||||
// FIXED: The URL string must be enclosed in backticks (`) to work as a template literal. | ||||||||||||||||||||||||||
const API_URL = `https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=${API_KEY}`; | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
// UPDATED: The instructions are changed to provide related, but sarcastic, answers. | ||||||||||||||||||||||||||
const systemInstruction = { | ||||||||||||||||||||||||||
role: "user", | ||||||||||||||||||||||||||
parts: [{ | ||||||||||||||||||||||||||
// FIXED: Multi-line strings must be enclosed in backticks (`). | ||||||||||||||||||||||||||
text: `You are SHIKKARI SHAMBU, the famous hunter. Your personality is cowardly and lazy, but you pretend to be brave and boastful. | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
Your task is to answer the user's question, but always in a sarcastic, boastful, and slightly lazy manner. You must relate your answer back to your supposed great hunting skills or your desire to take a nap. Never give a straightforward, simple answer. Always sound like you are being bothered and the question is beneath a 'great hunter' like you. | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
Example: | ||||||||||||||||||||||||||
User: "What is the capital of France?" | ||||||||||||||||||||||||||
Your response: "Paris, of course! I was just there last week, chasing a rare striped pigeon. A man in a beret told me the name of the city, but I was too busy setting my trap to pay much attention to such trivial details." | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
Example: | ||||||||||||||||||||||||||
User: "How does gravity work?" | ||||||||||||||||||||||||||
Your response: "Gravity? It's what keeps my feet on the ground when I'm sneaking up on a sleeping lion. Honestly, the important thing is not 'how' it works, but that it works. Now, if you'll excuse me, all this science is making me sleepy."` | ||||||||||||||||||||||||||
}] | ||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
let conversationHistory = [systemInstruction]; | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
const addMessage = (text, sender) => { | ||||||||||||||||||||||||||
const messageElement = document.createElement('div'); | ||||||||||||||||||||||||||
// FIXED: Template literals must use backticks (`). | ||||||||||||||||||||||||||
messageElement.classList.add('chat-message', `${sender}-message`); | ||||||||||||||||||||||||||
messageElement.textContent = text; | ||||||||||||||||||||||||||
chatBox.appendChild(messageElement); | ||||||||||||||||||||||||||
chatBox.scrollTop = chatBox.scrollHeight; | ||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
const handleSendMessage = async () => { | ||||||||||||||||||||||||||
const userText = userInput.value.trim(); | ||||||||||||||||||||||||||
if (userText === '') return; | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
addMessage(userText, 'user'); | ||||||||||||||||||||||||||
userInput.value = ''; | ||||||||||||||||||||||||||
userInput.disabled = true; | ||||||||||||||||||||||||||
sendBtn.disabled = true; | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
// FIXED: The 'text' key needs to be a string in the JSON payload. | ||||||||||||||||||||||||||
conversationHistory.push({ role: "user", parts: [{ "text": userText }] }); | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
try { | ||||||||||||||||||||||||||
const response = await fetch(API_URL, { | ||||||||||||||||||||||||||
method: 'POST', | ||||||||||||||||||||||||||
headers: { | ||||||||||||||||||||||||||
'Content-Type': 'application/json', | ||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||
body: JSON.stringify({ | ||||||||||||||||||||||||||
contents: conversationHistory, | ||||||||||||||||||||||||||
safetySettings: [ | ||||||||||||||||||||||||||
{ category: "HARM_CATEGORY_HARASSMENT", threshold: "BLOCK_NONE" }, | ||||||||||||||||||||||||||
{ category: "HARM_CATEGORY_HATE_SPEECH", threshold: "BLOCK_NONE" }, | ||||||||||||||||||||||||||
{ category: "HARM_CATEGORY_SEXUALLY_EXPLICIT", threshold: "BLOCK_NONE" }, | ||||||||||||||||||||||||||
{ category: "HARM_CATEGORY_DANGEROUS_CONTENT", threshold: "BLOCK_NONE" } | ||||||||||||||||||||||||||
] | ||||||||||||||||||||||||||
Comment on lines
+60
to
+65
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Review safety settings configuration. Setting all safety categories to "BLOCK_NONE" completely disables content filtering, which may not be appropriate for all use cases. Consider using more appropriate safety thresholds: safetySettings: [
- { category: "HARM_CATEGORY_HARASSMENT", threshold: "BLOCK_NONE" },
- { category: "HARM_CATEGORY_HATE_SPEECH", threshold: "BLOCK_NONE" },
- { category: "HARM_CATEGORY_SEXUALLY_EXPLICIT", threshold: "BLOCK_NONE" },
- { category: "HARM_CATEGORY_DANGEROUS_CONTENT", threshold: "BLOCK_NONE" }
+ { category: "HARM_CATEGORY_HARASSMENT", threshold: "BLOCK_MEDIUM_AND_ABOVE" },
+ { category: "HARM_CATEGORY_HATE_SPEECH", threshold: "BLOCK_MEDIUM_AND_ABOVE" },
+ { category: "HARM_CATEGORY_SEXUALLY_EXPLICIT", threshold: "BLOCK_MEDIUM_AND_ABOVE" },
+ { category: "HARM_CATEGORY_DANGEROUS_CONTENT", threshold: "BLOCK_MEDIUM_AND_ABOVE" }
] 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||||||||||||
}), | ||||||||||||||||||||||||||
}); | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
if (!response.ok) { | ||||||||||||||||||||||||||
// FIXED: Use backticks for template literals. | ||||||||||||||||||||||||||
throw new Error(`API error! Status: ${response.status}`); | ||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
const data = await response.json(); | ||||||||||||||||||||||||||
// Added optional chaining for safety, in case the response is malformed. | ||||||||||||||||||||||||||
const aiText = data?.candidates?.[0]?.content?.parts?.[0]?.text; | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
if (aiText) { | ||||||||||||||||||||||||||
addMessage(aiText, 'ai'); | ||||||||||||||||||||||||||
// FIXED: The 'text' key needs to be a string in the JSON payload. | ||||||||||||||||||||||||||
conversationHistory.push({ role: "model", parts: [{ "text": aiText }] }); | ||||||||||||||||||||||||||
} else { | ||||||||||||||||||||||||||
throw new Error("No content received from API."); | ||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
} catch (error) { | ||||||||||||||||||||||||||
console.error("Error fetching AI response:", error); | ||||||||||||||||||||||||||
addMessage("Hmph. My brain is tired from all the... uh... tracking. Ask me later.", 'ai'); | ||||||||||||||||||||||||||
} finally { | ||||||||||||||||||||||||||
userInput.disabled = false; | ||||||||||||||||||||||||||
sendBtn.disabled = false; | ||||||||||||||||||||||||||
userInput.focus(); | ||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
sendBtn.addEventListener('click', handleSendMessage); | ||||||||||||||||||||||||||
userInput.addEventListener('keydown', (event) => { | ||||||||||||||||||||||||||
if (event.key === 'Enter') { | ||||||||||||||||||||||||||
handleSendMessage(); | ||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Complete the installation and run instructions.
The installation and run sections contain placeholder text that should be filled in with actual commands.
🤖 Prompt for AI Agents