emilio-ih commited on
Commit
ae46b7f
·
verified ·
1 Parent(s): f3e863a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -48
app.py CHANGED
@@ -19,54 +19,6 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
19
  """
20
  return "What magic will you build ?"
21
 
22
- @tool
23
- def get_event_overview (event_id:str) -> str:
24
- """A tool that fetches the Overview of a given Goldcast overview.
25
- Args:
26
- event_id: The Goldcast webinar event_id (unique value)
27
- Returns:
28
- A JSON response in this format for all details related to the webinar in question:
29
- {
30
- "id": {an alphanumeric string},
31
- "title": {webinar's title},
32
- "timezone": "{webinar's timezone}",
33
- "start_time": "{utc start time}",
34
- "end_time": "{utc end time}",
35
- "location": "",
36
- "is_on_demand": {boolean},
37
- "is_test": {boolean},
38
- "tags": [],
39
- "host_type": "",
40
- "description": "",
41
- "goldcast_reg_page_link": {the webinar registration link},
42
- "logo": {logo image url},
43
- "favicon": "https://staticassets.goldcast.io/event%2Fundefined%2Fresources%2FJbJPHmMmQO6Gz5Hdc4ri_uber16x16.ico"
44
- }
45
- """
46
- #Authorization token
47
- auth_token_value = "71e05fd56b0c261ce576a0ca01a564ddc15946c1"
48
-
49
- #Request url
50
- base_url = "https://customapi.goldcast.io"
51
-
52
- # "Sandbox Event' ID
53
- sandbox_event_id = "4349bae4-4972-496f-a1ca-b77ee8fda994"
54
-
55
- # HTTP request
56
- request_url = f"{base_url}/event/{sandbox_event_id}/public/v1/overview/"
57
- #headers = "{'Accept':'application/json','Content-Type:'application/json'}"
58
-
59
- try:
60
- r = requests.get(request_url, auth('Token',auth_token_value))
61
- r.raise_for_status() # raise an exception for HTTP errors
62
-
63
- data = r.json()
64
-
65
- return status
66
-
67
- except Exception as e:
68
- return f"Error finding event data '{event_id}': {str(e)}"
69
-
70
 
71
  @tool
72
  def get_city_coordinates(city: str) -> str:
 
19
  """
20
  return "What magic will you build ?"
21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
  @tool
24
  def get_city_coordinates(city: str) -> str: