Skip to content

Commit

Permalink
Small UI changes and prompt engineering tweaks so that the bot will r…
Browse files Browse the repository at this point in the history
…ecognize users' prompts when sent with code files
  • Loading branch information
aliiyuu committed Aug 21, 2024
1 parent 84e3b54 commit f4aa45e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/Chatbot.css
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ h1 {
}

#send-button:disabled, #query-button:disabled {
background-color: #808080;
background-color: #8386a8;
cursor: not-allowed;
}

#send-button:disabled:hover, #query-button:disabled:hover {
background-color: #808080; /* Hover color for disabled state */
background-color: #8386a8; /* Hover color for disabled state */
}

#send-button:not(:disabled):hover, #query-button:not(:disabled):hover {
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export async function downloadCodebase() {
const apiURL = "https://syntaxsorcerer-backend.fly.dev";
const url = document.getElementById("codebase-url").value;

const response = await fetch(`${apiURL}/api/download`, {
const response = await fetch(`${local}/api/download`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand All @@ -32,7 +32,7 @@ export async function deleteCodebase() {
const local = "http://localhost:3000";
const apiURL = "https://syntaxsorcerer-backend.fly.dev";

const response = await fetch(`${apiURL}/api/delete`, {
const response = await fetch(`${local}/api/delete`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand Down Expand Up @@ -75,7 +75,7 @@ export async function sendFiles(files, userInput) {
request = request.concat(files[i] + "\n");
}

request = request.concat(userInput);
request = request.concat('I have a question about this code (if what follows does not seem like a reasonable question, prompt me to enter my question again): ' + userInput);

await fetchChatGPTResponse(request);
}
Expand Down Expand Up @@ -135,7 +135,7 @@ export async function fetchChatGPTResponse(userInput) {
const apiURL = "https://syntaxsorcerer-backend.fly.dev";
const codebasePath = "../../codebases";

const response = await fetch(`${apiURL}/api/chatgpt`, {
const response = await fetch(`${local}/api/chatgpt`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand All @@ -157,7 +157,7 @@ export async function fetchPineconeResponse(userInput) {
const local = "http://localhost:3000";
const apiURL = "https://syntaxsorcerer-backend.fly.dev";

const response = await fetch(`${apiURL}/api/pinecone`, {
const response = await fetch(`${local}/api/pinecone`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand Down

0 comments on commit f4aa45e

Please sign in to comment.