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:
parent
ed8efb3a96
commit
165f023513
4 changed files with 19 additions and 6 deletions
2
test.py
2
test.py
|
|
@ -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."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue