File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 11# test/rits_backend_tests/test_openai_integration.py
2+ import os
3+
24import pydantic
35import pytest
46from typing_extensions import Annotated
@@ -18,14 +20,14 @@ def backend(gh_run: int):
1820 return OpenAIBackend (
1921 model_id = META_LLAMA_3_2_1B ,
2022 formatter = TemplateFormatter (model_id = META_LLAMA_3_2_1B ),
21- base_url = "http://localhost:11434/v1" ,
23+ base_url = f "http://{ os . environ . get ( 'OLLAMA_HOST' , ' localhost:11434' ) } /v1" ,
2224 api_key = "ollama" ,
2325 )
2426 else :
2527 return OpenAIBackend (
2628 model_id = "granite3.3:8b" ,
2729 formatter = TemplateFormatter (model_id = "ibm-granite/granite-3.2-8b-instruct" ),
28- base_url = "http://localhost:11434/v1" ,
30+ base_url = f "http://{ os . environ . get ( 'OLLAMA_HOST' , ' localhost:11434' ) } /v1" ,
2931 api_key = "ollama" ,
3032 )
3133
Original file line number Diff line number Diff line change @@ -16,14 +16,14 @@ def test_start_session_openai_with_kwargs(gh_run):
1616 m = start_session (
1717 "openai" ,
1818 model_id = "llama3.2:1b" ,
19- base_url = "http://localhost:11434/v1" ,
19+ base_url = f "http://{ os . environ . get ( 'OLLAMA_HOST' , ' localhost:11434' ) } /v1" ,
2020 api_key = "ollama" ,
2121 )
2222 else :
2323 m = start_session (
2424 "openai" ,
2525 model_id = "granite3.3:8b" ,
26- base_url = "http://localhost:11434/v1" ,
26+ base_url = f "http://{ os . environ . get ( 'OLLAMA_HOST' , ' localhost:11434' ) } /v1" ,
2727 api_key = "ollama" ,
2828 )
2929 response = m .instruct ("testing" )
You can’t perform that action at this time.
0 commit comments