Update tools_registry.py
Browse files- tools_registry.py +12 -0
tools_registry.py
CHANGED
@@ -3,6 +3,18 @@ from dataclasses import dataclass
|
|
3 |
import inspect
|
4 |
from typing import _GenericAlias
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
@dataclass
|
7 |
class Tool:
|
8 |
name: str
|
|
|
3 |
import inspect
|
4 |
from typing import _GenericAlias
|
5 |
|
6 |
+
|
7 |
+
# DataClasses are like normal classes in Python, but they have some basic functions like instantiation, comparing, and printing the classes already implemented.
|
8 |
+
# Syntax: @dataclasses.dataclass(*, init=True, repr=True, eq=True, order=False, unsafe_hash=False, frozen=False)
|
9 |
+
|
10 |
+
# Parameters:
|
11 |
+
|
12 |
+
# init: If true __init__() method will be generated
|
13 |
+
# repr: If true __repr__() method will be generated
|
14 |
+
# eq: If true __eq__() method will be generated
|
15 |
+
# order: If true __lt__(), __le__(), __gt__(), and __ge__() methods will be generated.
|
16 |
+
# unsafe_hash: If False __hash__() method is generated according to how eq and frozen are set
|
17 |
+
# frozen: If true assigning to fields will generate an exception.
|
18 |
@dataclass
|
19 |
class Tool:
|
20 |
name: str
|