nora-lib 0.0.7.dev2__tar.gz → 0.1.7__tar.gz
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.
- {nora_lib-0.0.7.dev2 → nora_lib-0.1.7}/PKG-INFO +1 -1
- {nora_lib-0.0.7.dev2 → nora_lib-0.1.7}/nora_lib/interactions/interactions_service.py +14 -4
- {nora_lib-0.0.7.dev2 → nora_lib-0.1.7}/nora_lib.egg-info/PKG-INFO +1 -1
- {nora_lib-0.0.7.dev2 → nora_lib-0.1.7}/setup.py +1 -1
- {nora_lib-0.0.7.dev2 → nora_lib-0.1.7}/README.md +0 -0
- {nora_lib-0.0.7.dev2 → nora_lib-0.1.7}/nora_lib/__init__.py +0 -0
- {nora_lib-0.0.7.dev2 → nora_lib-0.1.7}/nora_lib/context/__init__.py +0 -0
- {nora_lib-0.0.7.dev2 → nora_lib-0.1.7}/nora_lib/context/context_service.py +0 -0
- {nora_lib-0.0.7.dev2 → nora_lib-0.1.7}/nora_lib/context/models.py +0 -0
- {nora_lib-0.0.7.dev2 → nora_lib-0.1.7}/nora_lib/interactions/__init__.py +0 -0
- {nora_lib-0.0.7.dev2 → nora_lib-0.1.7}/nora_lib/interactions/models.py +0 -0
- {nora_lib-0.0.7.dev2 → nora_lib-0.1.7}/nora_lib/py.typed +0 -0
- {nora_lib-0.0.7.dev2 → nora_lib-0.1.7}/nora_lib/tasks/__init__.py +0 -0
- {nora_lib-0.0.7.dev2 → nora_lib-0.1.7}/nora_lib/tasks/models.py +0 -0
- {nora_lib-0.0.7.dev2 → nora_lib-0.1.7}/nora_lib/tasks/state.py +0 -0
- {nora_lib-0.0.7.dev2 → nora_lib-0.1.7}/nora_lib.egg-info/SOURCES.txt +0 -0
- {nora_lib-0.0.7.dev2 → nora_lib-0.1.7}/nora_lib.egg-info/dependency_links.txt +0 -0
- {nora_lib-0.0.7.dev2 → nora_lib-0.1.7}/nora_lib.egg-info/requires.txt +0 -0
- {nora_lib-0.0.7.dev2 → nora_lib-0.1.7}/nora_lib.egg-info/top_level.txt +0 -0
- {nora_lib-0.0.7.dev2 → nora_lib-0.1.7}/pyproject.toml +0 -0
- {nora_lib-0.0.7.dev2 → nora_lib-0.1.7}/setup.cfg +0 -0
- {nora_lib-0.0.7.dev2 → nora_lib-0.1.7}/tests/tasks/__init__.py +0 -0
- {nora_lib-0.0.7.dev2 → nora_lib-0.1.7}/tests/tasks/test_state.py +0 -0
- {nora_lib-0.0.7.dev2 → nora_lib-0.1.7}/tests/test_placeholder.py +0 -0
|
@@ -79,11 +79,18 @@ class InteractionsService:
|
|
|
79
79
|
|
|
80
80
|
return res
|
|
81
81
|
|
|
82
|
-
def fetch_all_threads_by_channel(
|
|
82
|
+
def fetch_all_threads_by_channel(
|
|
83
|
+
self,
|
|
84
|
+
channel_id: str,
|
|
85
|
+
min_timestamp: str,
|
|
86
|
+
thread_event_types: Optional[list[str]] = None,
|
|
87
|
+
) -> dict:
|
|
83
88
|
"""Fetch a message from the Interactions API"""
|
|
84
89
|
message_url = f"{self.base_url}/interaction/v1/search/channel"
|
|
85
90
|
request_body = self._channel_lookup_request(
|
|
86
|
-
channel_id=channel_id,
|
|
91
|
+
channel_id=channel_id,
|
|
92
|
+
min_timestamp=min_timestamp,
|
|
93
|
+
thread_event_types=thread_event_types,
|
|
87
94
|
)
|
|
88
95
|
response = requests.post(
|
|
89
96
|
message_url,
|
|
@@ -166,7 +173,9 @@ class InteractionsService:
|
|
|
166
173
|
return response.json()
|
|
167
174
|
|
|
168
175
|
@staticmethod
|
|
169
|
-
def _channel_lookup_request(
|
|
176
|
+
def _channel_lookup_request(
|
|
177
|
+
channel_id: str, min_timestamp: str, thread_event_types: Optional[list[str]]
|
|
178
|
+
) -> dict:
|
|
170
179
|
"""Interaction service API request to get threads and messages for a channel"""
|
|
171
180
|
return {
|
|
172
181
|
"id": channel_id,
|
|
@@ -176,7 +185,8 @@ class InteractionsService:
|
|
|
176
185
|
"messages": {
|
|
177
186
|
"filter": {"min_timestamp": min_timestamp},
|
|
178
187
|
"apply_annotations_from_actors": ["*"],
|
|
179
|
-
}
|
|
188
|
+
},
|
|
189
|
+
"events": {"filter": {"type": thread_event_types or []}},
|
|
180
190
|
}
|
|
181
191
|
}
|
|
182
192
|
},
|
|
@@ -7,7 +7,7 @@ dev_requirements = ["mypy", "pytest", "black", "types-requests"]
|
|
|
7
7
|
|
|
8
8
|
setuptools.setup(
|
|
9
9
|
name="nora_lib",
|
|
10
|
-
version="0.
|
|
10
|
+
version="0.1.7",
|
|
11
11
|
description="For making and coordinating agents and tools",
|
|
12
12
|
url="https://github.com/allenai/nora_lib",
|
|
13
13
|
packages=setuptools.find_packages(exclude=(["tests"])),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|