openchatai / OpenChat

LLMs custom-chatbots console ⚡
https://open.cx
MIT License
5.17k stars 642 forks source link

Webapp Searchbox #235

Closed JuergenCornely closed 7 months ago

JuergenCornely commented 8 months ago

ad the latest django Version there is a problem with the web app serch box..

At The search js there is a wron url places for the system ( anyting wit .ro) i ve edit hte field with the right Servername. The search Box opens coreect ic can write a question but the Bot cant answer. No error message is displayed. At devtools i can see: Failed to load resource: the server responded with a status of 404 ()

lvalics commented 7 months ago

I worked in the search but I donțt think it was yet made a push. I hope will work. The URL is hardcoded in search.js, I changed now to be default http://0.0.0.0:8000 but aslyou you can overwrite from JS script. Example here: https://victoury.be/1.html

JuergenCornely commented 7 months ago

Sorry not on my system. The search js was autofilled with https://myserver.mydom.de/api.. i have tried with :800 or Api or static or.....

lvalics commented 7 months ago

What I have done I think was not yet pushed yet. Let me check.

JuergenCornely commented 7 months ago

Thanks i ll wait @

lvalics commented 7 months ago

Yeah, I found the issues, It was pushed the hardocoded version. Edit the search.js temporary look for baseURL:"https://____ /api"} and change it.

JuergenCornely commented 7 months ago

if changed the base URL from https://myserver.mydom.de/api. to: http://0.0.0.0:8000/ without succsess. At hte Chat,js it works with this config..

Ill fetch the search from the hardcoded Version a try it..

lvalics commented 7 months ago

You need to change in search.js the baseURL:"https:// and the URL from there change it to your URL, https://myserver.mydom.de/ and will work. The next version will not need anymore the URL from inside. It will be controlled from JavaScript.

JuergenCornely commented 7 months ago

no that doesnt work it tried it.. Axios Error 404

JuergenCornely commented 7 months ago

i think i ve to wait for the next version

lvalics commented 7 months ago

Maybe the guys will have time today to push the new version and I hope you will like it.

JuergenCornely commented 7 months ago

By the way you all do a very great Job here. And it is very great what this tool can do!!!!!

lvalics commented 7 months ago

You have a showcase ? We would like to know where people are using the software.

JuergenCornely commented 7 months ago

I ll make some features public so youn can acsses it. For the Integration in on of our Plattfor if mad ill send you a Video.. Ill tri it tomorrow

lvalics commented 7 months ago

Update was merged.

JuergenCornely commented 7 months ago

I m trying, container Web make some Problems i m analysing it

JuergenCornely commented 7 months ago

image Key Error with secrety Key?

lvalics commented 7 months ago

In your .env add a line

SECRET_KEY='yourkey here to be secret.'

JuergenCornely commented 7 months ago

That was the hint that i need. Can confirm that it is working.... Thanks a lot @lvalics...........

JuergenCornely commented 7 months ago

Here are 2 Short Videos about my internal Testintegration for Openchat

https://github.com/openchatai/OpenChat/assets/117660389/b6c196fc-ad2b-4067-beee-2a2c1ceef761

https://github.com/openchatai/OpenChat/assets/117660389/493552a5-303f-48f7-9f48-1747ff4ab5b5

lvalics commented 7 months ago

Nice ... on Chat now you have Is this response was usefull, YES/NO and it is working, marking into database for the moment. I want to implement on search as well to mark it to DB, then on admin to see which wanswers was ok and which not to finetune the prompt.

JuergenCornely commented 7 months ago

i got it with the latest update this week, but i made teh Video before.... By the way i ve another Quetion:

I ve made a integration lonnger time ago into another Software not Based on Openchat where i send a axios request to Openai to get a answer .. Can i acsess Openchat via axios to ask the system and get a answer ?

lvalics commented 7 months ago

I do not have knowledge in axios, so I cannot help you on this. Sorry.

JuergenCornely commented 7 months ago

It s okay axios isnt the problem i dont know how i can connect with openchat api from external system..

lvalics commented 7 months ago

https://yourdomain.com/api/chat/ etc, check api/urls.py for API part. I am working on this to do it easier to understand it. Also try in browser, /api/schema/swagger-ui/ /api/schema/redoc/

JuergenCornely commented 7 months ago

You have integrated swagger... I think thats all i need to get it working

lvalics commented 7 months ago

Partially. Still need to add all the endpoints, but had no time yet. So if you add, let me know, we will merge it.