Skip to content

feat(gooddata-sdk): [AUTO] add GenAiService for gen-ai HTTP API conversations#1406

Open
yenkins-admin wants to merge 2 commits intomasterfrom
feature/auto-P005-gen-ai-service
Open

feat(gooddata-sdk): [AUTO] add GenAiService for gen-ai HTTP API conversations#1406
yenkins-admin wants to merge 2 commits intomasterfrom
feature/auto-P005-gen-ai-service

Conversation

@yenkins-admin
Copy link
Contributor

Adds a new GenAiService SDK wrapper exposing the gen-ai microservice HTTP API (conversations CRUD and SSE message streaming) introduced by gdc-nas commit c75abfe.

Problem: P005 | Workflow: https://github.com/gooddata/gdc-nas/actions/runs/22995241596

What changed in gdc-nas

  • c75abfe — Added initial gen-ai service OpenAPI spec (open-api-spec.json, 1,483 lines, OpenAPI 3.1.0) defining 5 endpoints under /api/v1/ai/workspaces/{workspace_id}/chat/ with 25+ schemas. Integrated gen-ai service into docker-compose.yaml (GEN_AI_HTTP_HOST=gen-ai, GEN_AI_HTTP_PORT=8989) and configured api-gw Helm chart routing. Added taskId field to ConversationItemResponseDto.

Endpoints defined:

  • GET /conversations — list conversations
  • POST /conversations — create conversation
  • GET /conversations/{conversation_id} — get conversation
  • DELETE /conversations/{conversation_id} — delete conversation
  • GET /conversations/{conversation_id}/items — list conversation items
  • POST /conversations/{conversation_id}/messages — send message (SSE stream)

What was implemented in SDK

Created gooddata_sdk.gen_ai package with GenAiService backed by direct HTTP calls to the gen-ai microservice on its dedicated host/port (8989). Added optional gen_ai_host parameter to GoodDataApiClient and GoodDataSdk.create(), exposed sdk.gen_ai property, and exported GenAiService from the top-level package. Mock-based unit tests cover all six service methods.

Files modified

  • packages/gooddata-sdk/src/gooddata_sdk/gen_ai/__init__.py — new package init
  • packages/gooddata-sdk/src/gooddata_sdk/gen_ai/service.pyGenAiService with list_conversations, create_conversation, get_conversation, delete_conversation, list_conversation_items, send_message
  • packages/gooddata-sdk/src/gooddata_sdk/client.py — registered gen-ai client (port 8989)
  • packages/gooddata-sdk/src/gooddata_sdk/sdk.py — added gen_ai property on GoodDataSdk
  • packages/gooddata-sdk/src/gooddata_sdk/__init__.py — exported GenAiService
  • packages/gooddata-sdk/tests/gen_ai/__init__.py — test package init
  • packages/gooddata-sdk/tests/gen_ai/test_gen_ai_service.py — mock-based unit tests

JIRA: PENDING (Jira ticket will be created after review)
Risk: Low

AIDA Auto and others added 2 commits March 12, 2026 09:46
…rsations

Introduces a new gen_ai package with GenAiService wrapping the gen-ai
microservice endpoints (list/create/get/delete conversations, list items,
send message with SSE streaming). Adds gen_ai_host parameter to
GoodDataApiClient and GoodDataSdk.create(), and exposes sdk.gen_ai property.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Mar 12, 2026

Codecov Report

❌ Patch coverage is 94.73684% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.62%. Comparing base (46c0f4b) to head (6cbdc4b).

Files with missing lines Patch % Lines
...es/gooddata-sdk/src/gooddata_sdk/gen_ai/service.py 96.72% 2 Missing ⚠️
packages/gooddata-sdk/src/gooddata_sdk/client.py 85.71% 1 Missing ⚠️
packages/gooddata-sdk/src/gooddata_sdk/sdk.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1406      +/-   ##
==========================================
+ Coverage   77.53%   77.62%   +0.08%     
==========================================
  Files         225      227       +2     
  Lines       14614    14690      +76     
==========================================
+ Hits        11331    11403      +72     
- Misses       3283     3287       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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