Skip to content
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

Added WriterQuestionToKG and tests block for querying knowledge graphs #737

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

jayyuwriter
Copy link

Add WriterQuestionToKG Block

This PR adds a new Workflow block that enables querying multiple knowledge graphs. Does not include an SVG logo at this time.

Features

  • Query one or multiple knowledge graphs using comma-separated UUIDs
  • Support for subqueries option
  • Full error handling for missing or invalid inputs
  • Direct integration with Writer AI SDK for graph queries

Implementation Details

  • Uses WriterAIManager.acquire_client() for direct SDK access
  • Handles multiple graph IDs via comma-separated string parsing
  • Returns full Question response object with answer and subqueries
  • Configurable subqueries option (yes/no)

Testing

Added comprehensive test suite covering:

  • Single graph query
  • Multiple graph queries
  • Subqueries enabled/disabled
  • Error handling for:
    • Missing graph IDs
    • Empty graph IDs
    • Missing questions
    • Empty questions
    • Missing required fields

@ramedina86 ramedina86 marked this pull request as draft February 19, 2025 11:29
@ramedina86 ramedina86 marked this pull request as ready for review February 19, 2025 11:30
@ramedina86 ramedina86 marked this pull request as draft February 19, 2025 11:30
@ramedina86
Copy link
Collaborator

Let's reconvene when @mmikita95 makes the necessary changes so that you can avoid using the SDK directly

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.

2 participants