feat: 🎸 cpu (#2065)

increased

# Description

Please include a summary of the changes and the related issue. Please
also include relevant motivation and context.

## Checklist before requesting a review

Please delete options that are not relevant.

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented hard-to-understand areas
- [ ] I have ideally added tests that prove my fix is effective or that
my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged

## Screenshots (if appropriate):
This commit is contained in:
Stan Girard 2024-01-22 15:02:00 -08:00 committed by GitHub
parent 7c0887a887
commit 3ac4f02b73
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 435 additions and 482 deletions

View File

@ -4,8 +4,8 @@
{
"name": "quivr",
"image": "253053805092.dkr.ecr.eu-west-3.amazonaws.com/quivr:bada136312ad3497664c3562a36b263d43c89c53",
"cpu": "1024",
"memory": "2048",
"cpu": "2048",
"memory": "4096",
"portMappings": [
{
"name": "quivr-5050-tcp",
@ -86,15 +86,10 @@
}
],
"placementConstraints": [],
"compatibilities": [
"EC2",
"FARGATE"
],
"requiresCompatibilities": [
"FARGATE"
],
"cpu": "1024",
"memory": "2048",
"compatibilities": ["EC2", "FARGATE"],
"requiresCompatibilities": ["FARGATE"],
"cpu": "2048",
"memory": "4096",
"runtimePlatform": {
"cpuArchitecture": "X86_64",
"operatingSystemFamily": "LINUX"

View File

@ -4,8 +4,8 @@
{
"name": "quivr",
"image": "253053805092.dkr.ecr.eu-west-3.amazonaws.com/quivr:c0ff0301002fe6d043270b26dabcfda797437afc",
"cpu": "1024",
"memory": "2048",
"cpu": "2048",
"memory": "4096",
"portMappings": [
{
"name": "quivr-5050-tcp",
@ -87,15 +87,10 @@
}
],
"placementConstraints": [],
"compatibilities": [
"EC2",
"FARGATE"
],
"requiresCompatibilities": [
"FARGATE"
],
"cpu": "1024",
"memory": "2048",
"compatibilities": ["EC2", "FARGATE"],
"requiresCompatibilities": ["FARGATE"],
"cpu": "2048",
"memory": "4096",
"runtimePlatform": {
"cpuArchitecture": "X86_64",
"operatingSystemFamily": "LINUX"

View File

@ -4,17 +4,10 @@
{
"name": "quivr-chat",
"image": "253053805092.dkr.ecr.eu-west-3.amazonaws.com/quivr:600ff1ede02741c66853cc3e4e7f5001aaba3bc2",
"cpu": "256",
"memory": "1024",
"cpu": "1024",
"memory": "2048",
"essential": true,
"command": [
"celery",
"-A",
"celery_worker",
"worker",
"-l",
"info"
],
"command": ["celery", "-A", "celery_worker", "worker", "-l", "info"],
"environment": [],
"environmentFiles": [
{
@ -75,15 +68,10 @@
}
],
"placementConstraints": [],
"compatibilities": [
"EC2",
"FARGATE"
],
"requiresCompatibilities": [
"FARGATE"
],
"cpu": "256",
"memory": "1024",
"compatibilities": ["EC2", "FARGATE"],
"requiresCompatibilities": ["FARGATE"],
"cpu": "1024",
"memory": "2048",
"runtimePlatform": {
"cpuArchitecture": "X86_64",
"operatingSystemFamily": "LINUX"

View File

@ -4,19 +4,12 @@
{
"name": "quivr-chat",
"image": "253053805092.dkr.ecr.eu-west-3.amazonaws.com/quivr:35bd4727c67790d295a474dd81dfbef8469365e8",
"cpu": 1024,
"memory": 2048,
"memoryReservation": 2048,
"cpu": 2048,
"memory": 4096,
"memoryReservation": 4096,
"portMappings": [],
"essential": true,
"command": [
"celery",
"-A",
"celery_worker",
"worker",
"-l",
"info"
],
"command": ["celery", "-A", "celery_worker", "worker", "-l", "info"],
"environment": [],
"environmentFiles": [
{
@ -81,15 +74,10 @@
}
],
"placementConstraints": [],
"compatibilities": [
"EC2",
"FARGATE"
],
"requiresCompatibilities": [
"FARGATE"
],
"cpu": "1024",
"memory": "2048",
"compatibilities": ["EC2", "FARGATE"],
"requiresCompatibilities": ["FARGATE"],
"cpu": "2048",
"memory": "4096",
"runtimePlatform": {
"cpuArchitecture": "X86_64",
"operatingSystemFamily": "LINUX"

View File

@ -4,7 +4,7 @@
{
"name": "strapi",
"image": "253053805092.dkr.ecr.eu-west-3.amazonaws.com/quivr-strapi",
"cpu": 512,
"cpu": 1024,
"memory": 2048,
"portMappings": [
{
@ -78,13 +78,8 @@
}
],
"placementConstraints": [],
"compatibilities": [
"EC2",
"FARGATE"
],
"requiresCompatibilities": [
"FARGATE"
],
"compatibilities": ["EC2", "FARGATE"],
"requiresCompatibilities": ["FARGATE"],
"cpu": "1024",
"memory": "2048",
"runtimePlatform": {

View File

@ -71,7 +71,6 @@ class UserUsage(UserIdentity):
current_requests_count = self.supabase_db.get_user_requests_count_for_month(
self.id, date
)
logger.info("🔥🔥🔥🔥🔥🔥🔥🔥")
logger.info(current_requests_count)
if current_requests_count == 0:
logger.info("Request count is 0, creating new record")

View File

@ -36,11 +36,6 @@ def check_user_requests_limit(user: UserIdentity, model: str):
models_price = userDailyUsage.get_model_settings()
user_choosen_model_price = 1000
# Log all info
logger.info(
f"User {user.id} with email {user.email} has {monthly_chat_credit} monthly chat credit and has used {daily_user_count} requests today."
)
logger.info("🔥🔥")
for model_setting in models_price:
if model_setting["name"] == model:
user_choosen_model_price = model_setting["price"]

View File

@ -11,7 +11,6 @@ def list_files_from_storage(path):
try:
response = supabase_client.storage.from_("quivr").list(path)
logger.info("RESPONSE", response)
return response
except Exception as e:
logger.error(e)

View File

@ -37,7 +37,6 @@ class CustomSupabaseVectorStore(SupabaseVectorStore):
) -> [dict]:
vectors = self._embedding.embed_documents([query])
query_embedding = vectors[0]
logger.info("🤯🤯")
res = self._client.rpc(
table,