Skip to content

Add DaoXE OpenAI-compatible AsyncOpenAI example (Python) - #560

Open
seven7763 wants to merge 1 commit into
getzep:mainfrom
seven7763:feat/daoxe-openai-compat-example
Open

Add DaoXE OpenAI-compatible AsyncOpenAI example (Python)#560
seven7763 wants to merge 1 commit into
getzep:mainfrom
seven7763:feat/daoxe-openai-compat-example

Conversation

@seven7763

Copy link
Copy Markdown

Summary

Adds examples/python/daoxe-openai-compat showing AsyncZep agent memory with AsyncOpenAI pointed at DaoXE:

from openai import AsyncOpenAI

client = AsyncOpenAI(
    api_key=os.environ["DAOXE_API_KEY"],
    base_url="https://daoxe.com/v1",
)

Why this fits the examples tree

  • Mirrors existing OpenAI-style Zep samples (AsyncOpenAI + thread memory / context injection).
  • DaoXE is a multi-model, multi-protocol API gateway. This PR documents the OpenAI Chat Completions path only (same migration shape as other OpenAI-compatible backends). DaoXE also supports OpenAI Responses and Anthropic Messages / Claude protocol — those are out of scope for this folder.
  • Model IDs are account-scoped via DAOXE_MODEL (no hardcoded public model list).
  • Availability: DaoXE is not offered in mainland China; README notes regional guidance without hardcoding alternate hosts.

Files

Path Purpose
examples/python/daoxe-openai-compat/daoxe_zep_memory.py Seed prior thread → retrieve context → stream Chat Completions via DaoXE → write back to Zep
README.md Setup, env vars, multi-protocol + region notes
.env.example ZEP_API_KEY, DAOXE_API_KEY, DAOXE_MODEL, optional DAOXE_BASE_URL
requirements.txt openai, python-dotenv, zep-cloud

I maintain DaoXE. Related snippets: https://github.com/seven7763/DaoXE-AI

Test plan

  • cd examples/python/daoxe-openai-compat && python -m venv .venv && source .venv/bin/activate && pip install -r requirements.txt
  • cp .env.example .env and set ZEP_API_KEY, DAOXE_API_KEY, DAOXE_MODEL (exact account catalog ID)
  • python daoxe_zep_memory.py
  • Confirm streaming assistant reply references seeded Lisbon / walking-tour context when memory is available
  • Confirm no secrets committed (env-only keys/models)

Shows AsyncZep + AsyncOpenAI(base_url=https://daoxe.com/v1) with
account-scoped model IDs via env vars. Multi-protocol note; not
mainland China.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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