Skip to content

feat(gooddata-sdk): [AUTO] add allowed_relationship_types to ai_chat and ai_chat_stream#1346

Open
yenkins-admin wants to merge 1 commit intomasterfrom
feature/auto-P006-allowed-relationship-types-chat
Open

feat(gooddata-sdk): [AUTO] add allowed_relationship_types to ai_chat and ai_chat_stream#1346
yenkins-admin wants to merge 1 commit intomasterfrom
feature/auto-P006-allowed-relationship-types-chat

Conversation

@yenkins-admin
Copy link
Contributor

Expose the allowedRelationshipTypes field added to the GenAI Chat API in gdc-nas by wiring the new optional allowed_relationship_types parameter through the gooddata-sdk wrapper methods ai_chat() and ai_chat_stream().

P006 | Workflow: https://github.com/gooddata/gdc-nas/actions/runs/22179401494

What changed in gdc-nas

Merged PR #20108 (commit 85777a0):

  • Added allowedRelationshipTypes: List<AllowedRelationshipType>? field to ChatRequest data class in Chat.kt
  • Updated OpenAPI spec (open-api-spec.json) to add the allowedRelationshipTypes array property to the ChatRequest schema
  • Updated gRPC proto (gen_ai.proto) to add repeated AllowedRelationshipType allowed_relationship_types = 26 to the ChatRequest message
  • Updated GenAIProcessor.kt to map the new field to gRPC AllowedRelationshipType protobuf objects
  • Forwarded the new field through all gen-ai Python service layers (gen_ai_service_servicer.py, chat_service.py, search_settings.py, search_request_handler.py)
  • Extracted relationship filtering into a new standalone domain module relationship_filter.py, removing ~150 lines of duplicated logic from search_service.py

What was implemented in SDK

Branch: feature/auto-P006-allowed-relationship-types-chat (commit fb87e46)

  • Added optional allowed_relationship_types: Optional[list[AllowedRelationshipType]] = None parameter to ai_chat() and ai_chat_stream() in ComputeService; value is forwarded to ChatRequest when provided
  • Imported AllowedRelationshipType from the auto-generated gooddata_api_client and re-exported it from gooddata_sdk.__init__ so SDK consumers can import it directly
  • Added test_ai_chat_with_allowed_relationship_types and test_ai_chat_stream_with_allowed_relationship_types test cases demonstrating the new parameter

Files modified

  • packages/gooddata-sdk/src/gooddata_sdk/compute/service.py
  • packages/gooddata-sdk/src/gooddata_sdk/__init__.py
  • packages/gooddata-sdk/tests/compute/test_compute_service.py

JIRA: DX-TBD (pending Jira sandbox availability)
Risk: Low

…and ai_chat_stream

Expose the new allowedRelationshipTypes ChatRequest field via the SDK
wrapper. Both ai_chat() and ai_chat_stream() in ComputeService now
accept an optional allowed_relationship_types parameter
(list[AllowedRelationshipType]) that is forwarded to the API client.
AllowedRelationshipType is also re-exported from gooddata_sdk.__init__
for convenient SDK consumer imports. Tests added for both methods with
the new parameter.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments