Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
32f8860
First implementation of LiteLLM support
chibexme Mar 4, 2025
e9c6930
Removed exit and poetry.lock files
chibexme Mar 5, 2025
434466a
imports of error types where moved from openai to litellm
chibexme Mar 5, 2025
8de270f
Restored poetry.lock
chibexme Mar 6, 2025
c8d2e2c
Remove poetry.lock from PR
chibexme Mar 6, 2025
205b0b6
Remove poetry.lock from PR
chibexme Mar 6, 2025
8952596
Remove poetry.lock from PR
chibexme Mar 6, 2025
7f74698
Remove poetry.lock from PR
chibexme Mar 6, 2025
49d598c
Remove poetry.lock from PR
chibexme Mar 6, 2025
a12aa16
Remove poetry.lock from PR
chibexme Mar 6, 2025
98a8c57
Merge branch 'develop' into develop
chibexme Mar 6, 2025
61deeb3
Reset poetry.lock
chibexme Mar 11, 2025
a066c8f
Merge branch 'develop' of https://github.com/chibexme/parlant into de…
chibexme Mar 11, 2025
495c612
Merge branch 'emcie-co:develop' into develop
chibexme Mar 11, 2025
edb7db1
Reset poetry.lock
chibexme Mar 12, 2025
5311e23
Replaced poetry.lock with one from upstream repo
chibexme Mar 17, 2025
6e80262
Replaced poetry.lock with one from upstream repo
chibexme Mar 18, 2025
a2fa72c
Replaced poetry.lock with one from upstream repo
chibexme Mar 24, 2025
f0df024
Merge branch 'develop' into develop
kichanyurd Mar 24, 2025
365e57f
Modified LiteLLM nlp class to include optional LITELLM_PROVIDER_URL p…
chibexme Aug 26, 2025
9a19898
Merge remote-tracking branch 'upstream/develop' into develop
chibexme Aug 26, 2025
e98f957
Modified LiteLLM nlp class to optionally accept LITELLM_PROVIDER_URL …
chibexme Aug 26, 2025
60e4aac
DCO Remediation Commit for Chibuike Mba <chibexme@yahoo.com>
chibexme Aug 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ types-cachetools = "^6.0.0.20250525"
limits = "^5.5.0"



[tool.poetry.group.dev.dependencies]
ipython = "^8.26.0"
mypy = "^1.16.0"
Expand Down
8 changes: 8 additions & 0 deletions src/parlant/adapters/nlp/litellm_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Maintainer: Chibuike Mba <chibuike.mba@kemonai.com>

from __future__ import annotations
import time
from typing import Any, Mapping
Expand Down Expand Up @@ -120,6 +122,12 @@ async def _do_generate(
k: v for k, v in hints.items() if k in self.supported_litellm_params
}


# The base URL for the LiteLLM provider API
litellm_provider_url = os.environ.get("LITELLM_PROVIDER_URL")
if litellm_provider_url:
litellm_api_arguments["api_base"] = litellm_provider_url

t_start = time.time()

response = self._client.completion(
Expand Down
3 changes: 2 additions & 1 deletion src/parlant/bin/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,8 @@ def transform_and_exec_help(command: str) -> None:
@click.option(
"--litellm",
is_flag=True,
help="""Run with LiteLLM. The following environment variables must be set: LITELLM_PROVIDER_MODEL_NAME, LITELLM_PROVIDER_API_KEY.
help="""Run with LiteLLM. The following environment variables must be set: LITELLM_PROVIDER_MODEL_NAME, LITELLM_PROVIDER_API_KEY.
You should also set LITELLM_PROVIDER_URL if you're using self hosted llm supported by LiteLLM.
Check this link https://docs.litellm.ai/docs/providers for additional environment variables required for your provider,
set them and install the extra package parlant[litellm].""",
default=False,
Expand Down