File tree Expand file tree Collapse file tree
src/cas_reference_product Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,4 +10,4 @@ Dockerfile text eol=lf
1010* .md text eol =lf
1111* .toml text eol =lf
1212* .ps1 text eol =crlf
13- tests /contracts /cas-contracts /v0.1.0 /* .json - text
13+ tests /contracts /cas-contracts /v0.1.0 /* .json - text - diff
Original file line number Diff line number Diff line change 1- from functools import lru_cache
21import re
2+ from functools import lru_cache
33from typing import Literal
44
55from pydantic import Field
Original file line number Diff line number Diff line change @@ -36,13 +36,13 @@ class FoundryWorkflowAgentService:
3636 """Invoke a Foundry Next Gen agent reference through the project Responses client."""
3737
3838 def __init__ (self , settings : Settings ) -> None :
39- if not settings .foundry_ready :
39+ endpoint = settings .foundry_project_endpoint
40+ agent_name = settings .foundry_agent_name
41+ if not settings .foundry_ready or endpoint is None or agent_name is None :
4042 raise ValueError ("Foundry backend requires a valid project endpoint and agent name" )
41- assert settings .foundry_project_endpoint is not None
42- assert settings .foundry_agent_name is not None
43- self ._agent_name = settings .foundry_agent_name
43+ self ._agent_name = agent_name
4444 self ._client = AIProjectClient (
45- endpoint = settings . foundry_project_endpoint ,
45+ endpoint = endpoint ,
4646 credential = build_credential (settings .environment ),
4747 ).get_openai_client ()
4848
You can’t perform that action at this time.
0 commit comments