Skip to content

Conversation

@julwrites
Copy link
Owner

Updated the ScriptureBot API client to align with the latest OpenAPI specification for the Bible AI API.

Key changes:

  • Refactored pkg/app/api_models.go:
    • QueryRequest now has User (as UserOptions) at the top level.
    • Context is now Query.Context (nested inside QueryObject).
    • Added VersionsResponse and Version structs.
    • Added PromptResponse struct wrapping OQueryResponse in a Data field.
  • Updated pkg/app/api_client.go:
    • Added GetVersions function for the new /bible-versions endpoint.
    • Updated SubmitQuery mock logic to handle PromptResponse.
  • Refactored usage in pkg/app:
    • ask.go, passage.go, search.go updated to use the new QueryRequest structure.
    • ask.go updated to parse PromptResponse.
  • Updated tests:
    • api_client_test.go, ask_test.go, passage_test.go, search_test.go, api_models_test.go, test_utils_mock.go updated to reflect structural changes.
    • Added TestGetVersions.

PR created automatically by Jules for task 15739535559583949953 started by @julwrites

Refactored `QueryRequest` structure to place `User` at the root and nest `Context` within `Query`. Added `GetVersions` function to support `/bible-versions` endpoint. Updated `PromptResponse` handling for `/ask` command. Adjusted all relevant tests.

Co-authored-by: julwrites <18639913+julwrites@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@julwrites julwrites merged commit 017f6ab into staging Jan 29, 2026
1 check passed
@julwrites julwrites deleted the api-client-openapi-update-15739535559583949953 branch January 29, 2026 03:53
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