Skip to main content

GraphRAG LLM

Basic Completion

This example demonstrates basic usage of the LLM library to interact with Azure OpenAI. It loads environment variables for API configuration, creates a ModelConfig for Azure OpenAI, and sends a simple question to the model. The code handles both streaming and non-streaming responses (streaming responses are printed chunk by chunk in real-time, while non-streaming responses are printed all at once). It also shows how to use the gather_completion_response utility function as a simpler alternative that automatically handles both response types and returns the complete text.

Open the notebook to explore the basic completion example code

Basic Embedding

This examples demonstrates how to generate text embeddings using the GraphRAG LLM library with Azure OpenAI's embedding service. It loads API credentials from environment variables, creates a ModelConfig for the Azure embedding model and configures authentication to use either API key or Azure Managed Identity. The script then creates an embedding client and processes a batch of two text strings ("Hello world" and "How are you?") to generate their vector embeddings.

Open the notebook to explore the basic embeddings example code

View the notebooks for more examples.

Metadata

Release files for graphrag-llm 3.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for graphrag-llm 3.3.0
File Size Uploaded
graphrag_llm-3.3.0.tar.gz 60.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for graphrag-llm 3.3.0
File Interpreter ABI Platform
graphrag_llm-3.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 144.9 kB

Release files / graphrag_llm-3.3.0.tar.gz

Download URL graphrag_llm-3.3.0.tar.gz
Size 60.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1bf1613f02a09fed197e23670ab2d05156f289d420a799eeeb1635efbba1e588
BLAKE2b-256 checksum
How to use checksums
8a0b2becdb7c127af5e3daac342759c435ce3103bce4dc87e855d22ca2598d25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.17

Release files / graphrag_llm-3.3.0-py3-none-any.whl

Download URL graphrag_llm-3.3.0-py3-none-any.whl
Size 84.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
72bcd0bf5d1326659bd6bb5f42fb5046e6ced0c6551d231e6d8127498cd1bf63
BLAKE2b-256 checksum
How to use checksums
57a741a99b6ebe78b78db6bb99ef2216b7eb0ecbe4767a21a651f8d3301ea5e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.17

Release history Release notifications | RSS feed

This release

3.3.0 This release

2 release files

3.2.0

2 release files

3.1.2

2 release files

3.1.1

2 release files

3.1.0

2 release files

3.0.9

2 release files

3.0.8

2 release files

3.0.7

2 release files

3.0.6

2 release files

3.0.5

2 release files

3.0.4

2 release files

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page