Skip to content

Commit

Permalink
Made the backend url an evironment var
Browse files Browse the repository at this point in the history
  • Loading branch information
Raya679 committed Aug 23, 2024
1 parent dbee475 commit 3f00647
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/components/Chatbot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,12 @@ function FetchAnswer({ steps, triggerNextStep, setResult }: FetchAnswerProps) {
const fetchAnswerFromModel = async (question: string) => {
setIsFetching(true);
try {
const response = await axios.post('http://localhost:8080/generate_url/', {
query: question,
});
const response = await axios.post(
`${import.meta.env.NB_API_QUERY_AI_URL}/generate_url/`,
{
query: question,
}
);

const { data } = response;

Expand Down

0 comments on commit 3f00647

Please sign in to comment.