Skip to content

Commit

Permalink
rename the Literal env variable to LITERAL_API_URL (Chainlit#870)
Browse files Browse the repository at this point in the history
- backward compatible as `LITERAL_SERVER` is used as fallback
  • Loading branch information
tpatel committed Apr 15, 2024
1 parent efb861d commit 2df7529
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]

Nothing is unreleased!
### Changed

- Renamed the Literal environment variable to `LITERAL_API_URL` (it used to be `LITERAL_SERVER`)

## [1.0.500] - 2024-04-02

Expand Down
3 changes: 2 additions & 1 deletion backend/chainlit/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,8 @@ async def update_thread(


if api_key := os.environ.get("LITERAL_API_KEY"):
server = os.environ.get("LITERAL_SERVER")
# support legacy LITERAL_SERVER variable as fallback
server = os.environ.get("LITERAL_API_URL", os.environ.get("LITERAL_SERVER"))
_data_layer = ChainlitDataLayer(api_key=api_key, server=server)


Expand Down

0 comments on commit 2df7529

Please sign in to comment.