abdibrahem commited on
Commit
9b80cb4
·
1 Parent(s): 25cc1a4

Update the model and print generating response time

Browse files
Files changed (2) hide show
  1. Dockerfile +2 -2
  2. main.py +6 -3
Dockerfile CHANGED
@@ -96,8 +96,8 @@ while ! curl -s http://localhost:11434 >/dev/null; do\n\
96
  sleep 2\n\
97
  done\n\
98
  \n\
99
- echo "Pulling mixtral model..."\n\
100
- ollama pull mixtral\n\
101
  \n\
102
  echo "Starting FastAPI application..."\n\
103
  exec uvicorn main:app --host 0.0.0.0 --port 7860' > start.sh && \
 
96
  sleep 2\n\
97
  done\n\
98
  \n\
99
+ echo "Pulling gemma3 model..."\n\
100
+ ollama pull gemma3\n\
101
  \n\
102
  echo "Starting FastAPI application..."\n\
103
  exec uvicorn main:app --host 0.0.0.0 --port 7860' > start.sh && \
main.py CHANGED
@@ -44,12 +44,12 @@ class AIAgent:
44
  self.endpoints_documentation = endpoints_documentation
45
  self.ollama_base_url = "http://localhost:11434" # Default Ollama URL
46
  # self.model_name = "mistral" # Using mistral model for better multilingual support
47
- self.model_name = 'mixtral'
48
- self.BASE_URL = 'https://0a84-105-196-69-205.ngrok-free.app'
49
  self.headers = {
50
  'Content-type': 'application/json'
51
  }
52
- self.user_id = '03564fa7-0827-43d5-ba1d-cff2177e2d09'
53
  self.max_retries = 3
54
  self.retry_delay = 2 # seconds
55
 
@@ -530,6 +530,9 @@ class AIAgent:
530
  "extracted_keywords": ", ".join(extracted_keywords),
531
  "sentiment_analysis": json.dumps(sentiment_result)
532
  })
 
 
 
533
 
534
  # 2. Parse the router response
535
  route_result = router_result["route_result"]
 
44
  self.endpoints_documentation = endpoints_documentation
45
  self.ollama_base_url = "http://localhost:11434" # Default Ollama URL
46
  # self.model_name = "mistral" # Using mistral model for better multilingual support
47
+ self.model_name = 'gemma3'
48
+ self.BASE_URL = 'https://a961-105-196-69-205.ngrok-free.app'
49
  self.headers = {
50
  'Content-type': 'application/json'
51
  }
52
+ self.user_id = '76ceed74-143a-45c1-843e-ba583c122dea'
53
  self.max_retries = 3
54
  self.retry_delay = 2 # seconds
55
 
 
530
  "extracted_keywords": ", ".join(extracted_keywords),
531
  "sentiment_analysis": json.dumps(sentiment_result)
532
  })
533
+
534
+ # TODO: remove the print statement in production
535
+ print('End time of generating response: ', time.time() - start_time)
536
 
537
  # 2. Parse the router response
538
  route_result = router_result["route_result"]