Skip to main content

GraphRAG LLM package.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

graphrag_llm-3.0.9.tar.gz (60.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

graphrag_llm-3.0.9-py3-none-any.whl (84.0 kB view details)

Uploaded Python 3

File details

Details for the file graphrag_llm-3.0.9.tar.gz.

File metadata

  • Download URL: graphrag_llm-3.0.9.tar.gz
  • Upload date:
  • Size: 60.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.17

File hashes

Hashes for graphrag_llm-3.0.9.tar.gz
Algorithm Hash digest
SHA256 8cc66cbe0d489cd770e0fead0c85a16a95a0eb1a035cb2c36be106f57de167a0
MD5 34c33393bce3eb42ffea08f4878512ed
BLAKE2b-256 8012a2a7d2c4f39cc45c6c254f811a6e50226cba35d03c44ae3197ec61e6cbd2

See more details on using hashes here.

File details

Details for the file graphrag_llm-3.0.9-py3-none-any.whl.

File metadata

File hashes

Hashes for graphrag_llm-3.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 72f3c577584b2f649cf9b7a582436badf050ea5d87c4407c0a115d87dbacf47d
MD5 9f644ae0468a5a8ea1f70257dd062137
BLAKE2b-256 65d48a4a3c8bb0f0adbe984ff9670d2c477413bb7573cc19473d30a10f268485

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page