Skip to content

Add API key setup documentation to README.md for LLM authentication #8

@chigwell

Description

@chigwell

User Story
As a developer using the eknowledge package,
I want clear API key setup instructions in the README.md
so that I can properly authenticate and configure connections to LLM services like langchain_llm7.

Background
The current README.md installation section lacks documentation for API key configuration, which is critical for initializing the ChatLLM7 model. Without this, users encounter errors when attempting to run the provided example code, as authentication credentials are missing. The existing code snippet in README.md references ChatLLM7(model=MODEL) but provides no guidance on credential management, leading to failed LLM connections and user frustration.

Acceptance Criteria

  • Modify README.md under the Installation and Usage sections.
  • Add step-by-step instructions for:
    • Obtaining an API key for langchain_llm7.
    • Setting the API key via environment variables (e.g., export LLM7_API_KEY='your-key').
    • Securing the key (e.g., warning against hardcoding, suggesting .env files).
  • Update the example code to include:
    import os
    llm = ChatLLM7(model=MODEL, api_key=os.environ["LLM7_API_KEY"])
  • Validate by:
    1. Running a fresh environment with the updated README instructions.
    2. Confirming the example executes without authentication errors.
    3. Verifying warnings about key exposure are present.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions