Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,35 @@ text = (
)
asyncio.run(kg_builder.run_async(text=text))
driver.close()

### OpenAI-compatible multi-model gateways

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

With your change, the README would promote a specific third-party service (DaoXE) with a direct URL. This is unusual for an open-source library README. A more neutral approach would use a generic placeholder like https://your-gateway.example.com/v1 and mention well-known alternatives (LiteLLM, vLLM, Ollama, Azure OpenAI, etc.) rather than one lesser-known commercial gateway.


`OpenAILLM` and `OpenAIEmbeddings` accept OpenAI Python client kwargs such as `base_url` and `api_key`. Point them at any OpenAI-compatible Chat Completions / embeddings host. Example with [DaoXE](https://daoxe.com) (`https://daoxe.com/v1`):

```python
from neo4j_graphrag.embeddings import OpenAIEmbeddings
from neo4j_graphrag.llm import OpenAILLM

llm = OpenAILLM(
model_name="your-account-model-id", # exact ID from GET /v1/models or dashboard
api_key="your_daoxe_api_key",
base_url="https://daoxe.com/v1",
)

embedder = OpenAIEmbeddings(
model="your-account-embedding-model-id",
api_key="your_daoxe_api_key",
base_url="https://daoxe.com/v1",
)
```

Notes:

- Model IDs are account-scoped; do not hardcode a static public catalog.
- Chat Completions / embeddings paths only for this snippet.
- DaoXE is not available in mainland China.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a product-specific limitation note that has no place in generic library doc

- Contributor disclosure: this example was contributed by a DaoXE affiliate.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This reads as an advertisement. It's atypical for library documentation to include affiliate disclosures inline


```

> Warning: In order to run this code, the `openai` Python package needs to be installed: `pip install "neo4j_graphrag[openai]"`
Expand Down
Loading