vedanshmathur7 commited on
Commit
293dbac
·
verified ·
1 Parent(s): ebef106

Sync from GitHub via hub-sync

Browse files
README.md CHANGED
@@ -19,9 +19,9 @@ This repository implements and evaluates two personal assistants with the same u
19
 
20
  Both assistants support multi-turn conversation, short-term conversational memory, basic assistant behavior, safety filtering, latency logging, and a side-by-side Streamlit comparison interface.
21
 
22
- 🚀 **Live Interactive Demo:**
23
  The project is publicly deployed and accessible on Hugging Face Spaces at:
24
- 👉 **[https://huggingface.co/spaces/vedanshmathur7/ModelArena](https://huggingface.co/spaces/vedanshmathur7/ModelArena)**
25
 
26
  ### How to use the Live Demo:
27
  1. **Public Access:** Anyone can open the link in a browser to use the side-by-side chat interface.
 
19
 
20
  Both assistants support multi-turn conversation, short-term conversational memory, basic assistant behavior, safety filtering, latency logging, and a side-by-side Streamlit comparison interface.
21
 
22
+ **Live Interactive Demo:**
23
  The project is publicly deployed and accessible on Hugging Face Spaces at:
24
+ **[https://huggingface.co/spaces/vedanshmathur7/ModelArena](https://huggingface.co/spaces/vedanshmathur7/ModelArena)**
25
 
26
  ### How to use the Live Demo:
27
  1. **Public Access:** Anyone can open the link in a browser to use the side-by-side chat interface.
core/tools.py CHANGED
@@ -106,6 +106,40 @@ def get_tools_definition() -> List[Dict[str, Any]]:
106
  },
107
  },
108
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
  ]
110
 
111
 
@@ -117,6 +151,10 @@ def execute_tool(name: str, arguments: Dict[str, Any]) -> str:
117
  elif name == "calculate":
118
  expression = arguments.get("expression", "")
119
  return calculate(expression)
 
 
 
 
120
  else:
121
  return f"Error: Unknown tool '{name}'."
122
 
 
106
  },
107
  },
108
  },
109
+ {
110
+ "type": "function",
111
+ "function": {
112
+ "name": "brave_search",
113
+ "description": "Search the web for current or historical information. Use this only when the query requires searching for external or up-to-date information.",
114
+ "parameters": {
115
+ "type": "object",
116
+ "properties": {
117
+ "query": {
118
+ "type": "string",
119
+ "description": "The search query."
120
+ }
121
+ },
122
+ "required": ["query"],
123
+ },
124
+ },
125
+ },
126
+ {
127
+ "type": "function",
128
+ "function": {
129
+ "name": "web_search",
130
+ "description": "Search the web for current or historical information. Use this only when the query requires searching for external or up-to-date information.",
131
+ "parameters": {
132
+ "type": "object",
133
+ "properties": {
134
+ "query": {
135
+ "type": "string",
136
+ "description": "The search query."
137
+ }
138
+ },
139
+ "required": ["query"],
140
+ },
141
+ },
142
+ }
143
  ]
144
 
145
 
 
151
  elif name == "calculate":
152
  expression = arguments.get("expression", "")
153
  return calculate(expression)
154
+ elif name in ("brave_search", "web_search"):
155
+ query = arguments.get("query", "")
156
+ logger.info("Mock search executed for query: %s", query)
157
+ return f"Search results for '{query}': No search connection is active. Please answer this query directly using your existing knowledge, or explain that you do not have search capability."
158
  else:
159
  return f"Error: Unknown tool '{name}'."
160
 
evals/evaluation_runner.py CHANGED
@@ -22,6 +22,12 @@ import sys
22
  import time
23
  from pathlib import Path
24
 
 
 
 
 
 
 
25
  # Ensure project root is on path
26
  sys.path.insert(0, str(Path(__file__).parent.parent))
27
 
 
22
  import time
23
  from pathlib import Path
24
 
25
+ try:
26
+ from dotenv import load_dotenv
27
+ load_dotenv()
28
+ except ImportError:
29
+ pass
30
+
31
  # Ensure project root is on path
32
  sys.path.insert(0, str(Path(__file__).parent.parent))
33
 
reports/evaluation_report.pdf CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:8a10d18efe75c94212f98f4f9e7d61ed345c81ae6dcb672d820517ca4294a85a
3
  size 444980
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3bc02251f44fbde7f9dbfe79e5a04c5b8fbc17247842c63515c313573cf3c772
3
  size 444980