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

Uploaded Python 3

File details

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

File metadata

  • Download URL: graphrag_llm-3.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 56710912f5dafc6b8dd4fe1c1bfb6e88a639f6ab723d43efdd04961d6386120f
MD5 fb75dce74f24c1c883fad25cf792ce3f
BLAKE2b-256 3117b7c16958d62ca405b3d32e52e795c1153f5304f4eff2ebd7ea131b7c93e5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graphrag_llm-3.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 812decd68b532adb140760d3f5ae2fb17289f371917667e8d699a696534b7381
MD5 844c4a1974f4daf32101f2cfb9fb785f
BLAKE2b-256 39ab3d840a886c3337191e1c232594ad122880351ccd9b74126c787990bfd0a8

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