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.1.0.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.1.0-py3-none-any.whl (84.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: graphrag_llm-3.1.0.tar.gz
  • Upload date:
  • Size: 60.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for graphrag_llm-3.1.0.tar.gz
Algorithm Hash digest
SHA256 1e0a4117a63b4f59c174c0be6768b967d390a7417b19985e6a4ab63a1e3f6ed6
MD5 800a448c08b8bab056ba6c8e54cf0263
BLAKE2b-256 cfc8c25b05de1767a83af2b0f9429978bfb95e27e450f7d5f7d93041a4057f4f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: graphrag_llm-3.1.0-py3-none-any.whl
  • Upload date:
  • Size: 84.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for graphrag_llm-3.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e622f819050e71415db10820c5f73e98f001bb594665c249606434a8a728544e
MD5 a157a5b2bf0d456933e85fda51de4705
BLAKE2b-256 50afd918e34461e78834787971cada3e741307075151986b2fcbda958c2bd25d

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