nosible 0.3.2__tar.gz → 0.3.4__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.
- {nosible-0.3.2/src/nosible.egg-info → nosible-0.3.4}/PKG-INFO +1 -1
- {nosible-0.3.2 → nosible-0.3.4}/pyproject.toml +1 -1
- {nosible-0.3.2 → nosible-0.3.4}/src/nosible/nosible_client.py +1 -21
- {nosible-0.3.2 → nosible-0.3.4}/src/nosible/utils/rate_limiter.py +5 -0
- {nosible-0.3.2 → nosible-0.3.4/src/nosible.egg-info}/PKG-INFO +1 -1
- {nosible-0.3.2 → nosible-0.3.4}/LICENSE +0 -0
- {nosible-0.3.2 → nosible-0.3.4}/README.md +0 -0
- {nosible-0.3.2 → nosible-0.3.4}/setup.cfg +0 -0
- {nosible-0.3.2 → nosible-0.3.4}/setup.py +0 -0
- {nosible-0.3.2 → nosible-0.3.4}/src/nosible/__init__.py +0 -0
- {nosible-0.3.2 → nosible-0.3.4}/src/nosible/classes/result.py +0 -0
- {nosible-0.3.2 → nosible-0.3.4}/src/nosible/classes/result_set.py +0 -0
- {nosible-0.3.2 → nosible-0.3.4}/src/nosible/classes/search.py +0 -0
- {nosible-0.3.2 → nosible-0.3.4}/src/nosible/classes/search_set.py +0 -0
- {nosible-0.3.2 → nosible-0.3.4}/src/nosible/classes/snippet.py +0 -0
- {nosible-0.3.2 → nosible-0.3.4}/src/nosible/classes/snippet_set.py +0 -0
- {nosible-0.3.2 → nosible-0.3.4}/src/nosible/classes/web_page.py +0 -0
- {nosible-0.3.2 → nosible-0.3.4}/src/nosible/utils/json_tools.py +0 -0
- {nosible-0.3.2 → nosible-0.3.4}/src/nosible.egg-info/SOURCES.txt +0 -0
- {nosible-0.3.2 → nosible-0.3.4}/src/nosible.egg-info/dependency_links.txt +0 -0
- {nosible-0.3.2 → nosible-0.3.4}/src/nosible.egg-info/requires.txt +0 -0
- {nosible-0.3.2 → nosible-0.3.4}/src/nosible.egg-info/top_level.txt +0 -0
- {nosible-0.3.2 → nosible-0.3.4}/tests/test_01_nosible.py +0 -0
- {nosible-0.3.2 → nosible-0.3.4}/tests/test_02_results.py +0 -0
- {nosible-0.3.2 → nosible-0.3.4}/tests/test_03_search_searchset.py +0 -0
- {nosible-0.3.2 → nosible-0.3.4}/tests/test_04_snippets.py +0 -0
|
@@ -265,7 +265,6 @@ class Nosible:
|
|
|
265
265
|
def search(
|
|
266
266
|
self,
|
|
267
267
|
prompt: str = None,
|
|
268
|
-
recursions: int = 3,
|
|
269
268
|
agent: str = "cybernaut-1",
|
|
270
269
|
) -> ResultSet:
|
|
271
270
|
"""
|
|
@@ -277,8 +276,6 @@ class Nosible:
|
|
|
277
276
|
----------
|
|
278
277
|
prompt: str
|
|
279
278
|
The information you are looking for.
|
|
280
|
-
recursions: int
|
|
281
|
-
Maximum chain-of-search length.
|
|
282
279
|
agent: str
|
|
283
280
|
The search agent you want to use.
|
|
284
281
|
|
|
@@ -287,11 +284,6 @@ class Nosible:
|
|
|
287
284
|
ResultSet
|
|
288
285
|
The results of the search.
|
|
289
286
|
|
|
290
|
-
Raises
|
|
291
|
-
------
|
|
292
|
-
ValueError
|
|
293
|
-
If `recursions` is not [3,10].
|
|
294
|
-
|
|
295
287
|
Examples
|
|
296
288
|
--------
|
|
297
289
|
>>> from nosible import Nosible
|
|
@@ -299,21 +291,9 @@ class Nosible:
|
|
|
299
291
|
... results = nos.search("Interesting news from AI startups last week.")
|
|
300
292
|
... print(isinstance(results, ResultSet))
|
|
301
293
|
True
|
|
302
|
-
>>> with Nosible() as nos:
|
|
303
|
-
... results = nos.search(
|
|
304
|
-
... prompt="Interesting news from AI startups last week.",
|
|
305
|
-
... recursions=20
|
|
306
|
-
... ) # doctest: +ELLIPSIS
|
|
307
|
-
Traceback (most recent call last):
|
|
308
|
-
...
|
|
309
|
-
ValueError: Recursions must be [3,10].
|
|
310
294
|
"""
|
|
311
|
-
if recursions < 3 or recursions > 10:
|
|
312
|
-
raise ValueError("Recursions must be [3,10].")
|
|
313
|
-
|
|
314
295
|
payload = {
|
|
315
296
|
"prompt": prompt,
|
|
316
|
-
"recursions": recursions,
|
|
317
297
|
"agent": agent,
|
|
318
298
|
}
|
|
319
299
|
|
|
@@ -1752,7 +1732,7 @@ class Nosible:
|
|
|
1752
1732
|
prefix = (self.nosible_api_key or "").split("|", 1)[0]
|
|
1753
1733
|
|
|
1754
1734
|
# Map prefixes -> plan names
|
|
1755
|
-
plans = {"test", "basic", "pro", "pro+", "bus", "bus+", "ent", "chat", "cons", "stup", "busn"}
|
|
1735
|
+
plans = {"test", "self", "basic", "pro", "pro+", "bus", "bus+", "ent", "chat", "cons", "stup", "busn"}
|
|
1756
1736
|
|
|
1757
1737
|
if prefix not in plans:
|
|
1758
1738
|
raise ValueError(f"Your API key is not valid: {prefix} is not a valid plan prefix.")
|
|
@@ -51,6 +51,11 @@ PLAN_RATE_LIMITS = {
|
|
|
51
51
|
"bulk": [(60, 60), (1_500_000, 24 * 3600 * 30)],
|
|
52
52
|
"fast": [(360, 60), (15_000_000, 24 * 3600 * 30)],
|
|
53
53
|
},
|
|
54
|
+
"self": {
|
|
55
|
+
"scrape-url": [(6000, 60), (1_500_000, 24 * 3600 * 30)],
|
|
56
|
+
"bulk": [(6000, 60), (1_500_000, 24 * 3600 * 30)],
|
|
57
|
+
"fast": [(36_000, 60), (15_000_000, 24 * 3600 * 30)],
|
|
58
|
+
},
|
|
54
59
|
"cons": {
|
|
55
60
|
"scrape-url": [(60, 60), (3000, 24 * 3600 * 30)],
|
|
56
61
|
"bulk": [(60, 60), (3000, 24 * 3600 * 30)],
|
|
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
|
|
File without changes
|