Skip to content

feat(decisions): Configure.Decisions.openai for the decisions-openai module - #2189

Draft
jfrancoa wants to merge 2 commits into
jose/decisions-typesafeaifrom
jose/decisions-openai
Draft

jfrancoa wants to merge 2 commits into
jose/decisions-typesafeaifrom
jose/decisions-openai

Conversation

@jfrancoa

@jfrancoa jfrancoa commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

What

Configure.Decisions.openai(...) and Reconfigure.Decisions.openai(...) for the decisions-openai module (server: weaviate/weaviate#13409, weaviate/weaviate#13485), with the question setting (relevance or statement for a plain rerank), min_probability and order as rerank defaults, model, base_url and max_documents.

from weaviate.classes.config import Configure, DecisionsQuestion, DecisionsOrder

client.collections.create(
    "Tickets",
    decisions_config=Configure.Decisions.openai(
        question=DecisionsQuestion.STATEMENT,
        min_probability=0.6,
        order=DecisionsOrder.SEARCH,
    ),
)

decide= works as with decisions-typesafeai (#2188).

Tests

Unit: serialisation, update within the decisions kind, read-back. Integration (integration/test_collection_decisions_openai.py): against the API; needs OPENAI_APIKEY and the module on the server, skips otherwise.

Stacked on #2188.

@orca-security-eu orca-security-eu Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca

@jfrancoa
jfrancoa force-pushed the jose/decisions-openai branch from ca45aff to 941bd58 Compare October 12, 2026 21:55
@jfrancoa jfrancoa changed the title feat(decisions): add Configure.Decisions.openai for the decisions-openai module feat(decisions): Configure.Decisions.openai for the decisions-openai module Oct 12, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 53.73134% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.81%. Comparing base (f1a6600) to head (941bd58).

Files with missing lines Patch % Lines
integration/test_collection_decisions_openai.py 22.50% 31 Missing ⚠️
Additional details and impacted files
@@                      Coverage Diff                      @@
##           jose/decisions-typesafeai    #2189      +/-   ##
=============================================================
- Coverage                      88.95%   88.81%   -0.14%     
=============================================================
  Files                            310      310              
  Lines                          24692    24695       +3     
=============================================================
- Hits                           21965    21934      -31     
- Misses                          2727     2761      +34     

☔ View full report in Codecov by Harness.
📢 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.

@jfrancoa
jfrancoa force-pushed the jose/decisions-openai branch from 941bd58 to 933bcc4 Compare October 13, 2026 13:21
…nai module

`Configure.Decisions.openai(model, base_url, max_documents, question)`
builds a `decisions_config` for the `decisions-openai` module, which is
backed by OpenAI's Decisions API. `DecisionsQuestion` picks what the
module asks about every object of a `rerank`: the relevance of the
object to the query, or the query as a statement about the object.

The integration test needs an OpenAI key and the module on the server,
and skips otherwise.
Both decisions modules take the same class defaults for a rerank: the
threshold that drops a result and whether the search order is kept.
@jfrancoa
jfrancoa force-pushed the jose/decisions-openai branch from 933bcc4 to 7cc18b0 Compare October 13, 2026 13:24
@jfrancoa
jfrancoa force-pushed the jose/decisions-typesafeai branch from e106f58 to 2275aaf Compare October 13, 2026 13:24

This branch has not been deployed

No deployments
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