Skip to content

Commit

Permalink
rename all footprints of server to api
Browse files Browse the repository at this point in the history
  • Loading branch information
nwaughachukwuma committed Nov 4, 2024
1 parent 65335dc commit 511f69e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ ELEVENLABS_API_KEY="your-elevenlabs-api-key"

BUCKET_NAME="your-bucket-name"
APP_URL=http://localhost:8501
SERVER_URL=http://localhost:8585
API_URL=http://localhost:8585
File renamed without changes.
4 changes: 2 additions & 2 deletions app/src/utils/chat_thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from src.utils.render_audiocast_utils import generate_audiocast
from src.utils.session_state import reset_session

from env_var import SERVER_URL
from env_var import API_URL
from utils_pkg.chat_utils import (
ContentCategory,
SessionChatMessage,
Expand All @@ -29,7 +29,7 @@ def generate_stream_response(
)

response = httpx.post(
f"{SERVER_URL}/chat/{session_id}",
f"{API_URL}/chat/{session_id}",
json={**session_chat.model_dump()},
timeout=None,
)
Expand Down
6 changes: 3 additions & 3 deletions app/src/utils/render_audiocast_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import httpx
import streamlit as st

from env_var import APP_URL, SERVER_URL
from env_var import APP_URL, API_URL
from src.utils.render_waveform import render_waveform
from utils_pkg.audiocast_utils import GenerateAudioCastRequest, GenerateAudiocastDict
from utils_pkg.chat_utils import ContentCategory
Expand All @@ -22,7 +22,7 @@ def parse_ai_script(ai_script: str):


def get_audiocast(session_id: str):
response = httpx.get(f"{SERVER_URL}/audiocast/{session_id}", timeout=None)
response = httpx.get(f"{API_URL}/audiocast/{session_id}", timeout=None)
response.raise_for_status()
return cast(GenerateAudiocastDict, response.json())

Expand All @@ -38,7 +38,7 @@ async def generate_audiocast(
category=content_category,
)
response = httpx.post(
f"{SERVER_URL}/audiocast/generate",
f"{API_URL}/audiocast/generate",
json=audiocast_req.model_dump(),
timeout=None,
)
Expand Down
2 changes: 1 addition & 1 deletion env_var.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
ELEVENLABS_API_KEY = environ["ELEVENLABS_API_KEY"]

APP_URL = environ.get("APP_URL", "http://localhost:8501")
SERVER_URL = environ["SERVER_URL"]
API_URL = environ["API_URL"]

0 comments on commit 511f69e

Please sign in to comment.