Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Create Llama
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrored_repos
MachineLearning
run-llama
Create Llama
Commits
96fdb83a
Commit
96fdb83a
authored
9 months ago
by
Thuc Pham
Browse files
Options
Downloads
Patches
Plain Diff
use logger warning
parent
81bc340d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/types/streaming/fastapi/app/api/routers/chat.py
+3
-1
3 additions, 1 deletion
templates/types/streaming/fastapi/app/api/routers/chat.py
with
3 additions
and
1 deletion
templates/types/streaming/fastapi/app/api/routers/chat.py
+
3
−
1
View file @
96fdb83a
import
os
import
logging
from
pydantic
import
BaseModel
from
typing
import
List
,
Any
,
Optional
,
Dict
,
Tuple
from
fastapi
import
APIRouter
,
Depends
,
HTTPException
,
Request
,
status
...
...
@@ -50,7 +51,8 @@ class _SourceNodes(BaseModel):
file_name
=
metadata
.
get
(
"
file_name
"
)
url_prefix
=
os
.
getenv
(
"
FILESERVER_URL_PREFIX
"
)
if
not
url_prefix
:
print
(
"
Warning: FILESERVER_URL_PREFIX not set in environment variables
"
)
logger
=
logging
.
getLogger
(
"
uvicorn
"
)
logger
.
warning
(
"
Warning: FILESERVER_URL_PREFIX not set in environment variables
"
)
if
file_name
and
url_prefix
:
url
=
f
"
{
url_prefix
}
/data/
{
file_name
}
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment