codeBOKER commited on
Commit
9081d86
·
1 Parent(s): 7891d5f

Load MODEL_NAME from env via HF_MODEL, translate TOOLS descriptions to English

Browse files
Files changed (1) hide show
  1. ai_service.py +4 -4
ai_service.py CHANGED
@@ -1,11 +1,11 @@
1
  import re
2
  import json
3
  import os
4
- from config import pc, index, EMBED_MODEL, hf_client, PROMPT
5
  from database import db_manager
6
 
7
 
8
- MODEL_NAME = "dphn/Dolphin-Mistral-24B-Venice-Edition:featherless-ai"
9
 
10
  def clean_ai_response(text: str):
11
  if not text: return ""
@@ -32,13 +32,13 @@ TOOLS = [
32
  "type": "function",
33
  "function": {
34
  "name": "search_bank_knowledge",
35
- "description": "استخدم هذه الأداة للبحث في الملف التعريفي الرسمي لبنك حضرموت للحصول على معلومات دقيقة حول الخدمات، الهيكل التنظيمي، رأس المال، والسياسات.",
36
  "parameters": {
37
  "type": "object",
38
  "properties": {
39
  "query": {
40
  "type": "string",
41
- "description": "جملة البحث باللغة العربية (مثال: 'ما هو رأس مال بنك حضرموت؟' أو 'خدمات الأفراد')."
42
  }
43
  },
44
  "required": ["query"]
 
1
  import re
2
  import json
3
  import os
4
+ from config import pc, index, EMBED_MODEL, hf_client, PROMPT, HF_MODEL
5
  from database import db_manager
6
 
7
 
8
+ MODEL_NAME = HF_MODEL
9
 
10
  def clean_ai_response(text: str):
11
  if not text: return ""
 
32
  "type": "function",
33
  "function": {
34
  "name": "search_bank_knowledge",
35
+ "description": "Use this tool to search the official Hadhramout Bank profile for accurate information about services, organizational structure, capital, and policies.",
36
  "parameters": {
37
  "type": "object",
38
  "properties": {
39
  "query": {
40
  "type": "string",
41
+ "description": "The search query (e.g., 'What is Hadhramout Bank capital?' or 'individual services')."
42
  }
43
  },
44
  "required": ["query"]