Skip to content

Commit

Permalink
change search base url to variable
Browse files Browse the repository at this point in the history
  • Loading branch information
etwk committed Aug 2, 2024
1 parent c54f3d2 commit e641ee1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
LLM_LOCAL_BASE_URL=http://xinference:9997/v1
OLLAMA_BASE_URL=http://ollama:11434
HOSTING_CHECK_BASE_URL=http://127.0.0.1:8000
SEARCH_BASE_URL=https://s.jina.ai
RAG_MODEL_DEPLOY=local
5 changes: 3 additions & 2 deletions src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

logger = logging.getLogger(__name__)

SEARCH_BASE_URL = os.environ.get("SEARCH_BASE_URL")

def llm2list(text):
list_obj = []
try:
Expand Down Expand Up @@ -37,8 +39,7 @@ async def search(keywords):
Todo:
- Enhance response clear.
"""
base_url = 'https://s.jina.ai/'
constructed_url = base_url + keywords
constructed_url = SEARCH_BASE_URL + '/' + keywords

headers = {
"Accept": "application/json"
Expand Down

0 comments on commit e641ee1

Please sign in to comment.