feat: add API key authentication support

- Added  `api_key` parameter to `SecureChatCompletion` and `send_secure_request`
- Implemented Bearer token authentication in request headers
- Updated test configuration to use API key
- Fixed missing newline at end of `.gitignore`
This commit is contained in:
Alpha Nerd 2025-12-18 09:18:05 +01:00
parent ed8efb3a96
commit 165f023513
4 changed files with 19 additions and 6 deletions

View file

@ -9,7 +9,7 @@ the same interface as OpenAI's ChatCompletion.create() method.
import asyncio
from nomyo import SecureChatCompletion
client = SecureChatCompletion(base_url="http://localhost:12434", allow_http=True)
client = SecureChatCompletion(api_key="test-api-key-12345")
async def test_basic_chat():
"""Test basic chat completion with OpenAI-style API."""