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.2.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.2.0
File Size Uploaded
graphrag_llm-3.2.0.tar.gz 60.5 kB Details

Built distribution (wheel)

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

Total release size: 144.9 kB

Release files / graphrag_llm-3.2.0.tar.gz

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

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

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

Release history Release notifications | RSS feed

3.3.0

2 release files

This release

3.2.0 This release

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