Skip to content
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

System : Failed to execute 'open' on 'XMLHttpRequest': Invalid URL #213

Open
ForcewithMe66 opened this issue Jun 19, 2023 · 1 comment
Open

Comments

@ForcewithMe66
Copy link

ForcewithMe66 commented Jun 19, 2023

Hi @tricktreat , Everything works in CLI mode.

I tried to chat in web.

Human :
Please answer all the named entities in the sentence: Iron Man is a superhero appearing in American comic books published by Marvel Comics. The character was co-created by writer and editor Stan Lee, developed by scripter Larry Lieber, and designed by artists Don Heck and Jack Kirby.
System :
Failed to execute 'open' on 'XMLHttpRequest': Invalid URL

Here is my index.ts file

const HUGGINGGPT_BASE_URL = "http://{LAN_IP_of_the_server}:{port}/" //"http://localhost:8004"

// use ChatGPT: double click on the setting icon
const CHAT_GPT_URL = "https://api.openai.com"
const CHAT_GPT_LLM = "gpt-3.5-turbo" // gpt-3.5-turbo, gpt-4
// Dev: local endpoint
// const CHAT_GPT_URL = "http://localhost:8006"

export {HUGGINGGPT_BASE_URL, CHAT_GPT_URL, CHAT_GPT_LLM}

Everything works fine when I double click the setting icon (switch from huggingGPT to ChatGPT) and ask the same question in Web:

ChatGPT :
Hi there! I am OpenAI ChatGPT, an AI assistant for you. How can I help you? 
Human :
Please answer all the named entities in the sentence: Iron Man is a superhero appearing in American comic books published by Marvel Comics. The character was co-created by writer and editor Stan Lee, developed by scripter Larry Lieber, and designed by artists Don Heck and Jack Kirby.
ChatGPT :
Named entities in the sentence are:

1. Iron Man (superhero)
2. American (related to the comic books being published)
3. Marvel Comics (publishing house)
4. Stan Lee (writer and editor)
5. Larry Lieber (scripter)
6. Don Heck (artist)
7. Jack Kirby (artist)
@tricktreat
Copy link
Contributor

tricktreat commented Jun 19, 2023

@ForcewithMe66 Hi, you need to set HUGGINGGPT_BASE_URL correctly according to the configuration of the server side. For example set LAN_IP_of_the_server to your local ip address (If your web and server are on the same machine, set it to “localhost”), and port to your setting at

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants