Skip to content

making AI search property optional while creating capability host agent #40412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2025
Merged
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -247,16 +247,16 @@ def _validate_properties(self, capability_host: CapabilityHost, workspace_kind:
:type capability_host: CapabilityHost
:param workspace_kind: The kind of the workspace, Project only.
:type workspace_kind: str
:raises ~azure.ai.ml.exceptions.ValidationException: Raised if the OpenAI service connection or
vector store (AISearch) connection is empty for a Project workspace kind.
:raises ~azure.ai.ml.exceptions.ValidationException: Raised if the
OpenAI service connection is empty for a Project workspace kind.
Details will be provided in the error message.
:return: None, or the result of cls(response)
:rtype: None
"""

if workspace_kind == WorkspaceKind.PROJECT:
if capability_host.ai_services_connections is None or capability_host.vector_store_connections is None:
msg = "For Project workspace kind, OpenAI service connections and vector store (AISearch) connections are required." # pylint: disable=line-too-long
if capability_host.ai_services_connections is None:
msg = "For Project workspace kind, OpenAI service connections are required."
raise ValidationException(
message=msg,
target=ErrorTarget.CAPABILITY_HOST,
Expand Down