Skip to content
This repository was archived by the owner on Jan 5, 2025. It is now read-only.

Commit fcd6d05

Browse files
committed
furthur enhancements
1 parent b01bcd1 commit fcd6d05

File tree

8 files changed

+15
-13
lines changed

8 files changed

+15
-13
lines changed

dj_backend_server/Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,15 @@ ifndef venv
2929
endif
3030

3131
activate-venv:
32-
@echo $(shell tput setaf 3)"Activating virtual environment..."$(shell tput sgr0)
32+
@echo $$(tput setaf 3) "Activating virtual environment..." $$(tput sgr0)
3333
. venv/bin/activate
3434

3535

3636
install-requirements: activate-venv
37-
@echo $(shell tput setaf 2)"Installing Python dependencies..."$(shell tput sgr0)
37+
@echo $$(tput setaf 2) "Installing Python dependencies..." $$(tput sgr0)
3838
pip install -r requirements.txt
3939

40+
4041
install: .env install-requirements
4142
$(DOCKER_COMPOSE) up -d
4243

@@ -67,7 +68,7 @@ dev-start:
6768
@echo $(shell tput setaf 3)"Waiting for 20 seconds before opening the browser..."$(shell tput sgr0)
6869
sleep 20
6970

70-
$(OPEN_COMMAND) http://localhost:8000/
71+
$(OPEN_COMMAND) http://0.0.0.0:8000/
7172

7273
dev-stop:
7374
$(DOCKER_COMPOSE) down --remove-orphans

dj_backend_server/api/views/views_message.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def send_search_request(request):
3838

3939
# Implement the equivalent logic to send the HTTP request to the external API
4040
response = requests.post(
41-
'http://localhost:8000/api/chat',
41+
'http://0.0.0.0:8000/api/chat',
4242
json={
4343
'question': message,
4444
'namespace': str(bot.id), # Assuming getId returns a UUID object
@@ -103,7 +103,7 @@ def send_chat(request):
103103

104104
# Implement the equivalent logic to send the HTTP request to the external API
105105
response = requests.post(
106-
'http://localhost:8000/api/chat/',
106+
'http://0.0.0.0:8000/api/chat/',
107107
json={
108108
'question': content,
109109
'namespace': str(bot.id), # Assuming getId returns a UUID object

dj_backend_server/bugs_features_enhancements.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ bot_response = ChatbotResponse(response.json())
159159
fails for when content moderation finds an issue with submitted document or the prompt, test with FREE_TEST_DATA_100KB
160160

161161
Add more data source of type web is still not working - This has been fixed, but the bot takes an eternity to reply!!
162-
example bot - `http://localhost:8000/chat/76307849-98e7-46cf-a/`
162+
example bot - `http://0.0.0.0:8000/chat/76307849-98e7-46cf-a/`
163163
Needs more inspection
164164

165165

dj_backend_server/dj_backend_server/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,4 +186,4 @@
186186
# '0.0.0.0',
187187
#]
188188
ALLOWED_HOSTS = os.environ.get('ALLOWED_HOSTS', '0.0.0.0').split(',')
189-
APP_URL = os.environ.get('APP_URL', 'http://localhost:8000')
189+
APP_URL = os.environ.get('APP_URL', 'http://0.0.0.0:8000')

dj_backend_server/docker-compose.linux.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ services:
6767
env_file:
6868
- .env.docker
6969
command: >
70-
sh -c "python manage.py sync_models &&
70+
sh -c "python manage.py create_superuser &&
71+
python manage.py sync_models &&
7172
python manage.py runserver 0.0.0.0:8000"
7273
networks:
7374
- openchat_network

dj_backend_server/example.env.docker

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ DATABASE_PORT=3306
4848

4949
# Add Allowed Hosts here, no quote, just IP or domain, separated by a comma
5050
ALLOWED_HOSTS=localhost,0.0.0.0
51-
APP_URL=http://localhost:8000
51+
APP_URL=http://0.0.0.0:8000
5252

5353
# use 'external' if you want to use below services.
5454
PDF_LIBRARY = 'internal'

dj_backend_server/web/static/chat.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dj_backend_server/web/static/search.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)