23 lines
461 B
Python
23 lines
461 B
Python
|
|
"""
|
||
|
|
Script to run the AI service.
|
||
|
|
"""
|
||
|
|
|
||
|
|
import uvicorn
|
||
|
|
import os
|
||
|
|
import sys
|
||
|
|
|
||
|
|
# Set environment variables for testing
|
||
|
|
os.environ['PINECONE_API_KEY'] = 'test-key'
|
||
|
|
os.environ['PINECONE_ENVIRONMENT'] = 'test-env'
|
||
|
|
os.environ['OPENAI_API_KEY'] = 'test-key'
|
||
|
|
|
||
|
|
# Run the service
|
||
|
|
if __name__ == "__main__":
|
||
|
|
print("Starting AI service on 0.0.0.0:5251")
|
||
|
|
uvicorn.run(
|
||
|
|
"ai_service.api:app",
|
||
|
|
host="0.0.0.0",
|
||
|
|
port=5251,
|
||
|
|
reload=True
|
||
|
|
)
|