mixpeek 0.6.22__py3-none-any.whl → 0.6.23__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.
- mixpeek/client.py +1 -1
- mixpeek/endpoints/embed.py +8 -8
- mixpeek/endpoints/generate.py +4 -4
- {mixpeek-0.6.22.dist-info → mixpeek-0.6.23.dist-info}/METADATA +3 -2
- {mixpeek-0.6.22.dist-info → mixpeek-0.6.23.dist-info}/RECORD +7 -7
- {mixpeek-0.6.22.dist-info → mixpeek-0.6.23.dist-info}/WHEEL +0 -0
- {mixpeek-0.6.22.dist-info → mixpeek-0.6.23.dist-info}/top_level.txt +0 -0
mixpeek/client.py
CHANGED
@@ -11,7 +11,7 @@ from .endpoints.pipelines import Pipelines
|
|
11
11
|
class Mixpeek:
|
12
12
|
def __init__(self, api_key: str):
|
13
13
|
self.api_key = api_key
|
14
|
-
self.base_url = "
|
14
|
+
self.base_url = "http://localhost:8000/"
|
15
15
|
self.headers = {
|
16
16
|
"Authorization": f"Bearer {self.api_key}",
|
17
17
|
"Content-Type": "application/json"
|
mixpeek/endpoints/embed.py
CHANGED
@@ -5,44 +5,44 @@ class Embed:
|
|
5
5
|
self.base_url = base_url
|
6
6
|
self.headers = headers
|
7
7
|
|
8
|
-
def video(self,
|
8
|
+
def video(self, model_id: str, input: str, input_type: str):
|
9
9
|
url = f"{self.base_url}embed/"
|
10
10
|
data = {
|
11
11
|
"modality": "video",
|
12
|
-
"
|
12
|
+
"model_id": model_id,
|
13
13
|
"input": input,
|
14
14
|
"input_type": input_type
|
15
15
|
}
|
16
16
|
response = requests.post(url, json=data, headers=self.headers)
|
17
17
|
return response.json()
|
18
18
|
|
19
|
-
def text(self,
|
19
|
+
def text(self, model_id: str, input: str, input_type: str):
|
20
20
|
url = f"{self.base_url}embed/"
|
21
21
|
data = {
|
22
22
|
"modality": "text",
|
23
|
-
"
|
23
|
+
"model_id": model_id,
|
24
24
|
"input": input,
|
25
25
|
"input_type": input_type
|
26
26
|
}
|
27
27
|
response = requests.post(url, json=data, headers=self.headers)
|
28
28
|
return response.json()
|
29
29
|
|
30
|
-
def image(self,
|
30
|
+
def image(self, model_id: str, input: str, input_type: str):
|
31
31
|
url = f"{self.base_url}embed/"
|
32
32
|
data = {
|
33
33
|
"modality": "image",
|
34
|
-
"
|
34
|
+
"model_id": model_id,
|
35
35
|
"input": input,
|
36
36
|
"input_type": input_type
|
37
37
|
}
|
38
38
|
response = requests.post(url, json=data, headers=self.headers)
|
39
39
|
return response.json()
|
40
40
|
|
41
|
-
def audio(self,
|
41
|
+
def audio(self, model_id: str, input: str, input_type: str):
|
42
42
|
url = f"{self.base_url}embed/"
|
43
43
|
data = {
|
44
44
|
"modality": "audio",
|
45
|
-
"
|
45
|
+
"model_id": model_id,
|
46
46
|
"input": input,
|
47
47
|
"input_type": input_type
|
48
48
|
}
|
mixpeek/endpoints/generate.py
CHANGED
@@ -6,12 +6,12 @@ class Generate:
|
|
6
6
|
self.base_url = base_url
|
7
7
|
self.headers = headers
|
8
8
|
|
9
|
-
def
|
9
|
+
def text(self, model_id: str, response_format: BaseModel, context: str):
|
10
10
|
url = f"{self.base_url}generate/text"
|
11
11
|
data = {
|
12
|
-
"
|
12
|
+
"model_id": model_id,
|
13
|
+
"response_format": response_format.schema_json(), # Ensure correct method to get JSON schema
|
13
14
|
"context": context
|
14
15
|
}
|
15
16
|
response = requests.post(url, json=data, headers=self.headers)
|
16
|
-
return response.json()
|
17
|
-
|
17
|
+
return response.json()
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: mixpeek
|
3
|
-
Version: 0.6.
|
3
|
+
Version: 0.6.23
|
4
4
|
Summary: Mixpeek Python SDK
|
5
5
|
Home-page: https://github.com/mixpeek/mixpeek-python
|
6
6
|
Author: Ethan Steininger
|
@@ -46,7 +46,7 @@ extraction = mixpeek.extract.text(
|
|
46
46
|
|
47
47
|
```python
|
48
48
|
embedding = mixpeek.embed.video(
|
49
|
-
|
49
|
+
model_id="mixpeek/vuse-generic-v1",
|
50
50
|
input="s3://waving_boy.mp4",
|
51
51
|
input_type="url"
|
52
52
|
)
|
@@ -60,6 +60,7 @@ class ResponseFormat(BaseModel):
|
|
60
60
|
weather: float
|
61
61
|
|
62
62
|
generated_content = mixpeek.generate.text(
|
63
|
+
model_id="openai/gpt-4-turbo",
|
63
64
|
response_format=ResponseFormat,
|
64
65
|
context="Please tell me the weather and make sure to respond in the provided JSON schema"
|
65
66
|
)
|
@@ -1,14 +1,14 @@
|
|
1
1
|
mixpeek/__init__.py,sha256=XDdcK7wTEOEcF1cp-GeWmgPJ21Ny1R9pB0PPNrdDTMo,28
|
2
|
-
mixpeek/client.py,sha256=
|
2
|
+
mixpeek/client.py,sha256=aZ6zzSrqbV3RxD2G-W0Aqy06QWDfRux_0DfLr-awdG0,895
|
3
3
|
mixpeek/exceptions.py,sha256=Orhdo5UFLn3fcWVJtlgkznW8Iy5ndL96h0qTY8zOlDA,235
|
4
4
|
mixpeek/endpoints/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
5
|
mixpeek/endpoints/connections.py,sha256=ctzbdZV7ophrYOSqfHne0HE3sxxRXOep00qcujE0NKs,832
|
6
|
-
mixpeek/endpoints/embed.py,sha256=
|
6
|
+
mixpeek/endpoints/embed.py,sha256=8ds_FinxZRW-ZQyv6LjDAX6Zoek2Cv4OYhwIgSBqwTs,1598
|
7
7
|
mixpeek/endpoints/extract.py,sha256=1KWxvgbQanRwYcFPWGthyv32LVj2gAhxDERwY3QgHUg,476
|
8
|
-
mixpeek/endpoints/generate.py,sha256=
|
8
|
+
mixpeek/endpoints/generate.py,sha256=SFjVYfgeuIt4wO0I5ItnB4TEHhRkLgZOvQfWlEioye8,594
|
9
9
|
mixpeek/endpoints/pipelines.py,sha256=HgU00smP4guE0Qf601Up2mk9LqTimg4Dg27kkhE_H-Q,840
|
10
10
|
mixpeek/endpoints/tools.py,sha256=Yw6mvBqbrREY79l_BM6ek_CjxDPbFUdkmZqiaZcYSe8,787
|
11
|
-
mixpeek-0.6.
|
12
|
-
mixpeek-0.6.
|
13
|
-
mixpeek-0.6.
|
14
|
-
mixpeek-0.6.
|
11
|
+
mixpeek-0.6.23.dist-info/METADATA,sha256=qL5Nyo5TKlk0rKXA_4ZYi8TBIC55xseXT4Jssy-h9yo,1952
|
12
|
+
mixpeek-0.6.23.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
13
|
+
mixpeek-0.6.23.dist-info/top_level.txt,sha256=EJ8Jc4IhqyUwnUlBwKbs498Ju4O9a-IDh2kXc_lo6Vg,8
|
14
|
+
mixpeek-0.6.23.dist-info/RECORD,,
|
File without changes
|
File without changes
|