flock-core 0.4.0b6__py3-none-any.whl → 0.4.0b8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of flock-core might be problematic. Click here for more details.

@@ -0,0 +1,67 @@
1
+ """Tools for interacting with Zendesk."""
2
+
3
+ import os
4
+
5
+ import httpx
6
+
7
+ ZENDESK_BEARER_TOKEN = os.getenv("ZENDESK_BEARER_TOKEN")
8
+
9
+ HEADERS = {
10
+ "Authorization": f"Bearer {ZENDESK_BEARER_TOKEN}",
11
+ "Accept": "application/json",
12
+ }
13
+
14
+
15
+ def get_tickets(number_of_tickets: int = 10) -> list[dict]:
16
+ """Get all tickets."""
17
+ ZENDESK_SUBDOMAIN = os.getenv("ZENDESK_SUBDOMAIN_TICKET")
18
+ BASE_URL = f"https://{ZENDESK_SUBDOMAIN}.zendesk.com"
19
+ url = f"{BASE_URL}/api/v2/tickets.json"
20
+ all_tickets = []
21
+ with httpx.Client(headers=HEADERS, timeout=30.0) as client:
22
+ while url and len(all_tickets) < number_of_tickets:
23
+ response = client.get(url)
24
+ response.raise_for_status()
25
+
26
+ data = response.json()
27
+ tickets = data.get("tickets", [])
28
+ all_tickets.extend(tickets)
29
+
30
+ url = data.get("next_page")
31
+ return all_tickets
32
+
33
+
34
+ def get_ticket_by_id(ticket_id: str) -> dict:
35
+ """Get a ticket by ID."""
36
+ ZENDESK_SUBDOMAIN = os.getenv("ZENDESK_SUBDOMAIN_TICKET")
37
+ BASE_URL = f"https://{ZENDESK_SUBDOMAIN}.zendesk.com"
38
+ url = f"{BASE_URL}/api/v2/tickets/{ticket_id}"
39
+ with httpx.Client(headers=HEADERS, timeout=30.0) as client:
40
+ response = client.get(url)
41
+ response.raise_for_status()
42
+ return response.json()["ticket"]
43
+
44
+
45
+ def get_comments_by_ticket_id(ticket_id: str) -> list[dict]:
46
+ """Get all comments for a ticket."""
47
+ ZENDESK_SUBDOMAIN = os.getenv("ZENDESK_SUBDOMAIN_TICKET")
48
+ BASE_URL = f"https://{ZENDESK_SUBDOMAIN}.zendesk.com"
49
+ url = f"{BASE_URL}/api/v2/tickets/{ticket_id}/comments"
50
+ with httpx.Client(headers=HEADERS, timeout=30.0) as client:
51
+ response = client.get(url)
52
+ response.raise_for_status()
53
+ return response.json()["comments"]
54
+
55
+
56
+ def get_article_by_id(article_id: str) -> dict:
57
+ """Get an article by ID."""
58
+ ZENDESK_LOCALE = os.getenv("ZENDESK_ARTICLE_LOCALE")
59
+ ZENDESK_SUBDOMAIN = os.getenv("ZENDESK_SUBDOMAIN_ARTICLE")
60
+ BASE_URL = f"https://{ZENDESK_SUBDOMAIN}.zendesk.com"
61
+ url = (
62
+ f"{BASE_URL}/api/v2/help_center/{ZENDESK_LOCALE}/articles/{article_id}"
63
+ )
64
+ with httpx.Client(headers=HEADERS, timeout=30.0) as client:
65
+ response = client.get(url)
66
+ response.raise_for_status()
67
+ return response.json()["article"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flock-core
3
- Version: 0.4.0b6
3
+ Version: 0.4.0b8
4
4
  Summary: Declarative LLM Orchestration at Scale
5
5
  Author-email: Andre Ratzenberger <andre.ratzenberger@whiteduck.de>
6
6
  License-File: LICENSE
@@ -65,10 +65,13 @@ Description-Content-Type: text/markdown
65
65
  <a href="https://bsky.app/profile/whiteduck-gmbh.bsky.social" target="_blank"><img alt="Bluesky" src="https://img.shields.io/badge/bluesky-Follow-blue?style=for-the-badge&logo=bluesky&logoColor=%23fff&color=%23333&labelColor=%230285FF&label=whiteduck-gmbh"></a>
66
66
 
67
67
  🐤 Flock 0.4.0 currently in beta - use `pip install flock-core==0.4.0b5` 🐤
68
+
68
69
  🐤 `pip install flock-core` will install the latest non-beta version 🐤
70
+
69
71
  🐤 Expected Release for 0.4.0 `Magpie`: End of April 2025 🐤
70
72
 
71
73
 
74
+
72
75
  ## Overview
73
76
 
74
77
  Flock is a framework for orchestrating LLM-powered agents. It leverages a **declarative approach** where you simply specify what each agent needs as input and what it produces as output, without having to write lengthy, brittle prompts. Under the hood, Flock transforms these declarations into robust workflows, using cutting-edge components such as Temporal and DSPy to handle fault tolerance, state management, and error recovery.
@@ -68,6 +68,7 @@ flock/core/tools/azure_tools.py,sha256=hwLnI2gsEq6QzUoWj5eCGDKTdXY1XUf6K-H5Uwva2
68
68
  flock/core/tools/basic_tools.py,sha256=Ye7nlI4RRkqWRy8nH9CKuItBmh_ZXxUpouGnCOfx0s0,9050
69
69
  flock/core/tools/llm_tools.py,sha256=Bdt4Dpur5dGpxd2KFEQyxjfZazvW1HCDKY6ydMj6UgQ,21811
70
70
  flock/core/tools/markdown_tools.py,sha256=W6fGM48yGHbifVlaOk1jOtVcybfRbRmf20VbDOZv8S4,6031
71
+ flock/core/tools/zendesk_tools.py,sha256=0JRD48Uu27Hrb3aqVSvIieZ1kK6R-WUr2UzCgo9jDhk,2314
71
72
  flock/core/tools/dev_tools/github.py,sha256=a2OTPXS7kWOVA4zrZHynQDcsmEi4Pac5MfSjQOLePzA,5308
72
73
  flock/core/util/cli_helper.py,sha256=mbxFhAGDES1AySbz5D672Az-EWk88FIvtFIGJMEp6fc,49800
73
74
  flock/core/util/file_path_utils.py,sha256=Odf7uU32C-x1KNighbNERSiMtkzW4h8laABIoFK7A5M,6246
@@ -438,8 +439,8 @@ flock/workflow/activities.py,sha256=eVZDnxGJl_quNO-UTV3YgvTV8LrRaHN3QDAA1ANKzac,
438
439
  flock/workflow/agent_activities.py,sha256=NhBZscflEf2IMfSRa_pBM_TRP7uVEF_O0ROvWZ33eDc,963
439
440
  flock/workflow/temporal_setup.py,sha256=VWBgmBgfTBjwM5ruS_dVpA5AVxx6EZ7oFPGw4j3m0l0,1091
440
441
  flock/workflow/workflow.py,sha256=I9MryXW_bqYVTHx-nl2epbTqeRy27CAWHHA7ZZA0nAk,1696
441
- flock_core-0.4.0b6.dist-info/METADATA,sha256=abVhPX58YsOnir9jBSpDfv5TGDvKXGwHYdc312jQDRU,21097
442
- flock_core-0.4.0b6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
443
- flock_core-0.4.0b6.dist-info/entry_points.txt,sha256=rWaS5KSpkTmWySURGFZk6PhbJ87TmvcFQDi2uzjlagQ,37
444
- flock_core-0.4.0b6.dist-info/licenses/LICENSE,sha256=iYEqWy0wjULzM9GAERaybP4LBiPeu7Z1NEliLUdJKSc,1072
445
- flock_core-0.4.0b6.dist-info/RECORD,,
442
+ flock_core-0.4.0b8.dist-info/METADATA,sha256=LpE239lDyLKUciiPEGU1ySTsCewH6IMqSMENlm30Ehk,21100
443
+ flock_core-0.4.0b8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
444
+ flock_core-0.4.0b8.dist-info/entry_points.txt,sha256=rWaS5KSpkTmWySURGFZk6PhbJ87TmvcFQDi2uzjlagQ,37
445
+ flock_core-0.4.0b8.dist-info/licenses/LICENSE,sha256=iYEqWy0wjULzM9GAERaybP4LBiPeu7Z1NEliLUdJKSc,1072
446
+ flock_core-0.4.0b8.dist-info/RECORD,,