mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-21 22:59:07 +00:00
feat: Add lazy loading for images in PullRequestView
This commit is contained in:
parent
652e81e984
commit
0a02aba790
@ -10,7 +10,6 @@ Before you deploy LLM Server, you need to make sure you have the following:
|
||||
- **Docker Compose**: You need to have Docker Compose installed on your machine.
|
||||
- **System Requirements**: You need to have at least 64 GB of RAM, 32 GB GPU (compitable with CUDA & Docker), 8 CPU cores, and 100 GB of disk space. You could get away with less resources, but we recommend the above configuration for optimal performance.
|
||||
- **GPU is accessible by Docker**: You need to make sure that the GPU is accessible by Docker. Please read this [guide](https://docs.docker.com/compose/gpu-support/) for more information.
|
||||
- **OneUptime Server URL**: You need to have the URL of OneUptime Server. If you are using SaaS service its `https://oneuptime.com`. If you're self-hosting OneUptime, you need to have the URL of the self-hosted OneUptime Server.
|
||||
|
||||
### Installation
|
||||
|
||||
@ -26,8 +25,6 @@ llm:
|
||||
ports:
|
||||
- '8547:8547'
|
||||
image: 'oneuptime/llm:release'
|
||||
environment:
|
||||
ONEUPTIME_URL: 'https://oneuptime.com'
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
@ -52,4 +49,8 @@ You can set up TLS/SSL by having a reverse proxy in front of the LLM Server. Thi
|
||||
|
||||
### Public Access
|
||||
|
||||
Please make sure this server is publicly accessible. So, it can be accessed by Copilot.
|
||||
Please make sure this server is publicly accessible. So, it can be accessed by Copilot.
|
||||
|
||||
### Security
|
||||
|
||||
Please also make sure to secure the server by setting up a firewall so only copilot can access it.
|
20
LLM/app.py
20
LLM/app.py
@ -93,12 +93,12 @@ async def lifespan(app:FastAPI):
|
||||
# Declare a Pydantic model for the request body
|
||||
class Prompt(BaseModel):
|
||||
messages: list
|
||||
secretkey: str
|
||||
# secretkey: str
|
||||
|
||||
# Declare a Pydantic model for the request body
|
||||
class PromptResult(BaseModel):
|
||||
id: str
|
||||
secretkey: str
|
||||
# secretkey: str
|
||||
|
||||
app = FastAPI(lifespan=lifespan)
|
||||
|
||||
@ -119,11 +119,11 @@ async def create_item(prompt: Prompt):
|
||||
return {"error": "Prompt is required"}
|
||||
|
||||
# Validate the secret key
|
||||
is_valid = await validateSecretKey(prompt.secretkey)
|
||||
# is_valid = await validateSecretKey(prompt.secretkey)
|
||||
|
||||
if not is_valid:
|
||||
print("Invalid secret key")
|
||||
return {"error": "Invalid secret key"}
|
||||
# if not is_valid:
|
||||
# print("Invalid secret key")
|
||||
# return {"error": "Invalid secret key"}
|
||||
|
||||
# messages are in str format. We need to convert them fron json [] to list
|
||||
messages = prompt.messages
|
||||
@ -164,11 +164,11 @@ async def prompt_status(prompt_status: PromptResult):
|
||||
print(prompt_status)
|
||||
|
||||
# Validate the secret key
|
||||
is_valid = await validateSecretKey(prompt_status.secretkey)
|
||||
# is_valid = await validateSecretKey(prompt_status.secretkey)
|
||||
|
||||
if not is_valid:
|
||||
print("Invalid secret key")
|
||||
return {"error": "Invalid secret key"}
|
||||
# if not is_valid:
|
||||
# print("Invalid secret key")
|
||||
# return {"error": "Invalid secret key"}
|
||||
|
||||
# If not prompt status then return bad request error
|
||||
if not prompt_status:
|
||||
|
@ -241,9 +241,6 @@ ALLOWED_ACTIVE_MONITOR_COUNT_IN_FREE_PLAN=10
|
||||
# This webhook notifies slack when the new user signs up or is created.
|
||||
NOTIFICATION_WEBHOOK_ON_CREATED_USER=
|
||||
|
||||
# This is the OneUptime Server URL LLM container will use to validate requests. It should be the url where you host the server.
|
||||
LLM_ONEUPTIME_SERVER_URL=https://localhost
|
||||
|
||||
# Copilot Environment Variables
|
||||
COPILOT_ONEUPTIME_URL=http://localhost
|
||||
COPILOT_ONEUPTIME_REPOSITORY_SECRET_KEY=
|
||||
|
@ -188,7 +188,6 @@ services:
|
||||
environment:
|
||||
<<: *common-server-variables
|
||||
PORT: 8547
|
||||
ONEUPTIME_URL: ${LLM_ONEUPTIME_SERVER_URL}
|
||||
volumes:
|
||||
- ./LLM/Models:/app/Models
|
||||
logging:
|
||||
|
Loading…
Reference in New Issue
Block a user