weco 0.1.6__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.
- {weco-0.1.6 → weco-0.1.7}/.github/workflows/release.yml +5 -2
- {weco-0.1.6 → weco-0.1.7}/PKG-INFO +1 -1
- {weco-0.1.6 → weco-0.1.7}/pyproject.toml +1 -1
- {weco-0.1.6 → weco-0.1.7}/weco/client.py +9 -4
- {weco-0.1.6 → weco-0.1.7}/weco.egg-info/PKG-INFO +1 -1
- {weco-0.1.6 → weco-0.1.7}/.github/workflows/lint.yml +0 -0
- {weco-0.1.6 → weco-0.1.7}/.gitignore +0 -0
- {weco-0.1.6 → weco-0.1.7}/LICENSE +0 -0
- {weco-0.1.6 → weco-0.1.7}/README.md +0 -0
- {weco-0.1.6 → weco-0.1.7}/assets/weco.svg +0 -0
- {weco-0.1.6 → weco-0.1.7}/examples/cookbook.ipynb +0 -0
- {weco-0.1.6 → weco-0.1.7}/setup.cfg +0 -0
- {weco-0.1.6 → weco-0.1.7}/tests/test_asynchronous.py +0 -0
- {weco-0.1.6 → weco-0.1.7}/tests/test_batching.py +0 -0
- {weco-0.1.6 → weco-0.1.7}/tests/test_synchronous.py +0 -0
- {weco-0.1.6 → weco-0.1.7}/weco/__init__.py +0 -0
- {weco-0.1.6 → weco-0.1.7}/weco/constants.py +0 -0
- {weco-0.1.6 → weco-0.1.7}/weco/functional.py +0 -0
- {weco-0.1.6 → weco-0.1.7}/weco/utils.py +0 -0
- {weco-0.1.6 → weco-0.1.7}/weco.egg-info/SOURCES.txt +0 -0
- {weco-0.1.6 → weco-0.1.7}/weco.egg-info/dependency_links.txt +0 -0
- {weco-0.1.6 → weco-0.1.7}/weco.egg-info/requires.txt +0 -0
- {weco-0.1.6 → weco-0.1.7}/weco.egg-info/top_level.txt +0 -0
|
@@ -74,12 +74,15 @@ jobs:
|
|
|
74
74
|
inputs: >-
|
|
75
75
|
./dist/*.tar.gz
|
|
76
76
|
./dist/*.whl
|
|
77
|
+
- name: Debug Print github.ref_name
|
|
78
|
+
run: >-
|
|
79
|
+
echo "github.ref_name: ${{ github.ref_name }}"
|
|
77
80
|
- name: Create GitHub Release
|
|
78
81
|
env:
|
|
79
82
|
GITHUB_TOKEN: ${{ github.token }}
|
|
80
83
|
run: >-
|
|
81
84
|
gh release create
|
|
82
|
-
'
|
|
85
|
+
'v0.1.7'
|
|
83
86
|
--repo '${{ github.repository }}'
|
|
84
87
|
--notes ""
|
|
85
88
|
- name: Upload artifact signatures to GitHub Release
|
|
@@ -90,5 +93,5 @@ jobs:
|
|
|
90
93
|
# sigstore-produced signatures and certificates.
|
|
91
94
|
run: >-
|
|
92
95
|
gh release upload
|
|
93
|
-
'
|
|
96
|
+
'v0.1.7' dist/**
|
|
94
97
|
--repo '${{ github.repository }}'
|
|
@@ -10,7 +10,7 @@ authors = [
|
|
|
10
10
|
]
|
|
11
11
|
description = "A client facing API for interacting with the WeCo AI function builder service."
|
|
12
12
|
readme = "README.md"
|
|
13
|
-
version = "0.1.
|
|
13
|
+
version = "0.1.7"
|
|
14
14
|
license = {text = "MIT"}
|
|
15
15
|
requires-python = ">=3.8"
|
|
16
16
|
dependencies = ["asyncio", "httpx[http2]", "pillow"]
|
|
@@ -25,11 +25,18 @@ class WecoAI:
|
|
|
25
25
|
"""A client for the WecoAI function builder API that allows users to build and query specialized functions built by LLMs.
|
|
26
26
|
The user must simply provide a task description to build a function, and then query the function with an input to get the result they need.
|
|
27
27
|
Our client supports both synchronous and asynchronous request paradigms and uses HTTP/2 for faster communication with the API.
|
|
28
|
+
Support for multimodality is included.
|
|
28
29
|
|
|
29
30
|
Attributes
|
|
30
31
|
----------
|
|
31
32
|
api_key : str
|
|
32
33
|
The API key used for authentication.
|
|
34
|
+
|
|
35
|
+
timeout : float
|
|
36
|
+
The timeout for the HTTP requests in seconds. Default is 120.0.
|
|
37
|
+
|
|
38
|
+
http2 : bool
|
|
39
|
+
Whether to use HTTP/2 protocol for the HTTP requests. Default is True.
|
|
33
40
|
"""
|
|
34
41
|
|
|
35
42
|
def __init__(self, api_key: str = None, timeout: float = 120.0, http2: bool = True) -> None:
|
|
@@ -41,7 +48,7 @@ class WecoAI:
|
|
|
41
48
|
The API key used for authentication. If not provided, the client will attempt to read it from the environment variable - WECO_API_KEY.
|
|
42
49
|
|
|
43
50
|
timeout : float, optional
|
|
44
|
-
The timeout for the HTTP requests in seconds (default is
|
|
51
|
+
The timeout for the HTTP requests in seconds (default is 120.0).
|
|
45
52
|
|
|
46
53
|
http2 : bool, optional
|
|
47
54
|
Whether to use HTTP/2 protocol for the HTTP requests (default is True).
|
|
@@ -405,8 +412,6 @@ class WecoAI:
|
|
|
405
412
|
ValueError
|
|
406
413
|
If the input is invalid.
|
|
407
414
|
"""
|
|
408
|
-
warnings.warn("Setting the version number of the function is not yet supported. Currently, the first version of the function will be used i.e., version 0.")
|
|
409
|
-
version_number = 0
|
|
410
415
|
# Validate the input
|
|
411
416
|
image_info = self._validate_query(text_input=text_input, images_input=images_input)
|
|
412
417
|
|
|
@@ -477,7 +482,7 @@ class WecoAI:
|
|
|
477
482
|
Returns
|
|
478
483
|
-------
|
|
479
484
|
dict
|
|
480
|
-
|
|
485
|
+
A dictionary containing the output of the function, the number of input tokens, the number of output tokens,
|
|
481
486
|
and the latency in milliseconds.
|
|
482
487
|
"""
|
|
483
488
|
return self._query(fn_name=fn_name, version_number=version_number, text_input=text_input, images_input=images_input, is_async=False)
|
|
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
|