try to fix
Browse files
app.py
CHANGED
@@ -3,7 +3,9 @@ import datetime
|
|
3 |
import requests
|
4 |
import pytz
|
5 |
import yaml
|
|
|
6 |
import tkapi
|
|
|
7 |
from tools.final_answer import FinalAnswerTool
|
8 |
|
9 |
from Gradio_UI import GradioUI
|
@@ -11,13 +13,12 @@ from Gradio_UI import GradioUI
|
|
11 |
api = tkapi.TKApi()
|
12 |
|
13 |
|
14 |
-
@tool
|
15 |
def Get_Active_Fractions() -> list[dict[str, str | int]]:
|
16 |
"""
|
17 |
Retrieves a list of all currently active fractions (political parties) in the Dutch parliament.
|
18 |
|
19 |
Returns:
|
20 |
-
|
21 |
- 'naam': Full name of the political party (string)
|
22 |
- 'afkorting': Abbreviation/acronym of the party (string)
|
23 |
- 'zetels_aantal': Number of seats the party holds (integer)
|
|
|
3 |
import requests
|
4 |
import pytz
|
5 |
import yaml
|
6 |
+
from typing import List, Dict
|
7 |
import tkapi
|
8 |
+
from tkapi.fractie import Fractie
|
9 |
from tools.final_answer import FinalAnswerTool
|
10 |
|
11 |
from Gradio_UI import GradioUI
|
|
|
13 |
api = tkapi.TKApi()
|
14 |
|
15 |
|
|
|
16 |
def Get_Active_Fractions() -> list[dict[str, str | int]]:
|
17 |
"""
|
18 |
Retrieves a list of all currently active fractions (political parties) in the Dutch parliament.
|
19 |
|
20 |
Returns:
|
21 |
+
List[Dict[str, Union[str, int]]]: A list of dictionaries containing information about each fraction:
|
22 |
- 'naam': Full name of the political party (string)
|
23 |
- 'afkorting': Abbreviation/acronym of the party (string)
|
24 |
- 'zetels_aantal': Number of seats the party holds (integer)
|