Skip to content

Commit 5fd9bed

Browse files
committed
docs: add DaoXE OpenAI-compatible gateway example
Document DaoXE via OpenAIGenericClient with base_url https://daoxe.com/v1, using account-scoped model env vars (no hardcoded model list). Signed-off-by: seven7763 <246023385+seven7763@users.noreply.github.com>
1 parent 526dcad commit 5fd9bed

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,34 @@ graphiti = Graphiti(
595595

596596
Ensure Ollama is running (`ollama serve`) and that you have pulled the models you want to use.
597597

598+
For a hosted OpenAI-compatible gateway, keep `OpenAIGenericClient` and point `base_url` at the provider's `/v1`
599+
endpoint. For example, [DaoXE](https://daoxe.com) exposes multi-protocol access (OpenAI Chat Completions, OpenAI
600+
Responses, and Anthropic Messages); Graphiti's Python path below uses Chat Completions at `https://daoxe.com/v1`.
601+
602+
Use the model IDs from your DaoXE account catalog (IDs are account-scoped and change over time — do not hardcode a
603+
static public list). Embeddings may need a separate embedding-capable model or provider if your catalog does not
604+
include one.
605+
606+
```python
607+
import os
608+
609+
from graphiti_core.llm_client.config import LLMConfig
610+
from graphiti_core.llm_client.openai_generic_client import OpenAIGenericClient
611+
612+
# Chat Completions base. Prefer models that reliably return structured JSON for Graphiti extraction.
613+
llm_config = LLMConfig(
614+
api_key=os.environ["DAOXE_API_KEY"],
615+
model=os.environ["DAOXE_MODEL"], # e.g. an account-scoped chat model id from https://daoxe.com
616+
small_model=os.environ.get("DAOXE_SMALL_MODEL", os.environ["DAOXE_MODEL"]),
617+
base_url="https://daoxe.com/v1",
618+
)
619+
620+
llm_client = OpenAIGenericClient(config=llm_config)
621+
```
622+
623+
If you are in mainland China and cannot reach `daoxe.com`, use the regional endpoint documented on the DaoXE site
624+
instead of hardcoding an alternate host here.
625+
598626
### Structured output and small models
599627

600628
Graphiti depends on structured (JSON) output for entity/edge extraction and deduplication, and works best with models

0 commit comments

Comments
 (0)