Skip to content

feat(integrations): add OpenAI Assistants file_search tool adapter (#73) - #214

Merged
codeforstartups merged 1 commit into
codeforstartups:developmentfrom
Kaap10:feat/openai-assistant-tool
Sep 19, 2026
Merged

codeforstartups merged 1 commit into
codeforstartups:developmentfrom
Kaap10:feat/openai-assistant-tool

Conversation

@Kaap10

@Kaap10 Kaap10 commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds an OpenAI Assistants and Function Calling tool adapter (as_openai_tool and OpenAIAssistantTool) to expose Dynavec serverless hybrid vector retrieval to OpenAI Assistant runs and Chat Completions with zero external dependencies.

This allows developers to attach Dynavec as a tool in OpenAI Assistant run loops without paying for OpenAI's hosted vector storage files.

Related issue

Fixes #73

Changes

  • Implemented OpenAIAssistantTool and as_openai_tool() in src/dynavec/integrations/tools.py with OpenAI Function Calling v2 schema generation.
  • Added single (handle_tool_call) and batch (submit_tool_outputs) execution handlers with duck-typing for OpenAI SDK objects, SimpleNamespace, and raw dictionaries.
  • Added resilient argument parsing (handling JSON strings, pre-parsed dicts, list arguments, and fallback query keys).
  • Exported tool helpers in src/dynavec/integrations/__init__.py.
  • Added end-to-end runnable demonstration in examples/openai_assistant_tool.py.
  • Added 16 offline unit tests in tests/test_openai_tool.py.

Testing

  • Tests pass locally (uv run pytest tests/test_openai_tool.py - 16 passed, full suite 523 passed)
  • Ruff checks pass (uv run ruff check and uv run ruff format --check)
  • Documentation updated, if applicable

Checklist

  • My changes are focused and relevant to this pull request.
  • I have added or updated tests where appropriate.
  • I have reviewed my changes for unrelated modifications.
  • I have updated documentation where necessary.

@codeforstartups codeforstartups left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Solid integration — a dynavec-backed retrieval tool for OpenAI Assistants / function calling (#73), with an example showing the run-loop tool-call handling. CI green. Merging — thanks @Kaap10! 🙌

@codeforstartups
codeforstartups merged commit a2a7130 into codeforstartups:development Sep 19, 2026
3 checks passed
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.

OpenAI Assistants file_search-style adapter

2 participants