openaivec 0.13.6__py3-none-any.whl → 0.14.0__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.
- openaivec/__init__.py +8 -4
- openaivec/{di.py → _di.py} +2 -0
- openaivec/{embeddings.py → _embeddings.py} +3 -3
- openaivec/{log.py → _log.py} +1 -1
- openaivec/{model.py → _model.py} +4 -0
- openaivec/{optimize.py → _optimize.py} +3 -1
- openaivec/{prompt.py → _prompt.py} +2 -2
- openaivec/{provider.py → _provider.py} +5 -3
- openaivec/{proxy.py → _proxy.py} +3 -1
- openaivec/{responses.py → _responses.py} +4 -4
- openaivec/{serialize.py → _serialize.py} +1 -1
- openaivec/{util.py → _util.py} +2 -0
- openaivec/pandas_ext.py +25 -18
- openaivec/spark.py +13 -4
- openaivec/task/__init__.py +1 -1
- openaivec/task/customer_support/customer_sentiment.py +2 -2
- openaivec/task/customer_support/inquiry_classification.py +2 -2
- openaivec/task/customer_support/inquiry_summary.py +2 -2
- openaivec/task/customer_support/intent_analysis.py +2 -2
- openaivec/task/customer_support/response_suggestion.py +2 -2
- openaivec/task/customer_support/urgency_analysis.py +2 -2
- openaivec/task/nlp/dependency_parsing.py +2 -2
- openaivec/task/nlp/keyword_extraction.py +2 -2
- openaivec/task/nlp/morphological_analysis.py +2 -2
- openaivec/task/nlp/named_entity_recognition.py +2 -2
- openaivec/task/nlp/sentiment_analysis.py +2 -2
- openaivec/task/nlp/translation.py +2 -2
- openaivec/task/table/fillna.py +3 -3
- {openaivec-0.13.6.dist-info → openaivec-0.14.0.dist-info}/METADATA +3 -3
- openaivec-0.14.0.dist-info/RECORD +35 -0
- openaivec-0.13.6.dist-info/RECORD +0 -35
- {openaivec-0.13.6.dist-info → openaivec-0.14.0.dist-info}/WHEEL +0 -0
- {openaivec-0.13.6.dist-info → openaivec-0.14.0.dist-info}/licenses/LICENSE +0 -0
openaivec/__init__.py
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
from .
|
|
2
|
-
from .
|
|
1
|
+
from ._embeddings import AsyncBatchEmbeddings, BatchEmbeddings
|
|
2
|
+
from ._model import PreparedTask
|
|
3
|
+
from ._prompt import FewShotPromptBuilder
|
|
4
|
+
from ._responses import AsyncBatchResponses, BatchResponses
|
|
3
5
|
|
|
4
6
|
__all__ = [
|
|
5
|
-
"
|
|
7
|
+
"AsyncBatchEmbeddings",
|
|
6
8
|
"AsyncBatchResponses",
|
|
7
9
|
"BatchEmbeddings",
|
|
8
|
-
"
|
|
10
|
+
"BatchResponses",
|
|
11
|
+
"FewShotPromptBuilder",
|
|
12
|
+
"PreparedTask",
|
|
9
13
|
]
|
openaivec/{di.py → _di.py}
RENAMED
|
@@ -2,6 +2,8 @@ from dataclasses import dataclass, field
|
|
|
2
2
|
from threading import RLock
|
|
3
3
|
from typing import Any, Callable, Dict, Set, Type, TypeVar
|
|
4
4
|
|
|
5
|
+
__all__ = []
|
|
6
|
+
|
|
5
7
|
"""Simple dependency injection container with singleton lifecycle management.
|
|
6
8
|
|
|
7
9
|
This module provides a lightweight dependency injection container that manages
|
|
@@ -6,9 +6,9 @@ import numpy as np
|
|
|
6
6
|
from numpy.typing import NDArray
|
|
7
7
|
from openai import AsyncOpenAI, InternalServerError, OpenAI, RateLimitError
|
|
8
8
|
|
|
9
|
-
from openaivec.
|
|
10
|
-
from openaivec.
|
|
11
|
-
from openaivec.
|
|
9
|
+
from openaivec._log import observe
|
|
10
|
+
from openaivec._proxy import AsyncBatchingMapProxy, BatchingMapProxy
|
|
11
|
+
from openaivec._util import backoff, backoff_async
|
|
12
12
|
|
|
13
13
|
__all__ = [
|
|
14
14
|
"BatchEmbeddings",
|
openaivec/{log.py → _log.py}
RENAMED
openaivec/{model.py → _model.py}
RENAMED
|
@@ -5,6 +5,8 @@ from dataclasses import dataclass, field
|
|
|
5
5
|
from datetime import datetime, timezone
|
|
6
6
|
from typing import List
|
|
7
7
|
|
|
8
|
+
__all__ = []
|
|
9
|
+
|
|
8
10
|
|
|
9
11
|
@dataclass(frozen=True)
|
|
10
12
|
class PerformanceMetric:
|
|
@@ -20,7 +22,7 @@ class BatchSizeSuggester:
|
|
|
20
22
|
min_batch_size: int = 10
|
|
21
23
|
min_duration: float = 30.0
|
|
22
24
|
max_duration: float = 60.0
|
|
23
|
-
step_ratio: float = 0.
|
|
25
|
+
step_ratio: float = 0.2
|
|
24
26
|
sample_size: int = 4
|
|
25
27
|
_history: List[PerformanceMetric] = field(default_factory=list)
|
|
26
28
|
_lock: threading.RLock = field(default_factory=threading.RLock, repr=False)
|
|
@@ -51,8 +51,8 @@ from openai import OpenAI
|
|
|
51
51
|
from openai.types.responses import ParsedResponse
|
|
52
52
|
from pydantic import BaseModel
|
|
53
53
|
|
|
54
|
-
from openaivec.
|
|
55
|
-
from openaivec.
|
|
54
|
+
from openaivec._model import ResponsesModelName
|
|
55
|
+
from openaivec._provider import CONTAINER
|
|
56
56
|
|
|
57
57
|
__all__ = [
|
|
58
58
|
"FewShotPrompt",
|
|
@@ -4,8 +4,8 @@ import warnings
|
|
|
4
4
|
import tiktoken
|
|
5
5
|
from openai import AsyncAzureOpenAI, AsyncOpenAI, AzureOpenAI, OpenAI
|
|
6
6
|
|
|
7
|
-
from openaivec import di
|
|
8
|
-
from openaivec.
|
|
7
|
+
from openaivec import _di as di
|
|
8
|
+
from openaivec._model import (
|
|
9
9
|
AzureOpenAIAPIKey,
|
|
10
10
|
AzureOpenAIAPIVersion,
|
|
11
11
|
AzureOpenAIBaseURL,
|
|
@@ -13,7 +13,9 @@ from openaivec.model import (
|
|
|
13
13
|
OpenAIAPIKey,
|
|
14
14
|
ResponsesModelName,
|
|
15
15
|
)
|
|
16
|
-
from openaivec.
|
|
16
|
+
from openaivec._util import TextChunker
|
|
17
|
+
|
|
18
|
+
__all__ = []
|
|
17
19
|
|
|
18
20
|
CONTAINER = di.Container()
|
|
19
21
|
|
openaivec/{proxy.py → _proxy.py}
RENAMED
|
@@ -4,7 +4,9 @@ from collections.abc import Hashable
|
|
|
4
4
|
from dataclasses import dataclass, field
|
|
5
5
|
from typing import Any, Awaitable, Callable, Dict, Generic, List, TypeVar
|
|
6
6
|
|
|
7
|
-
from openaivec.
|
|
7
|
+
from openaivec._optimize import BatchSizeSuggester
|
|
8
|
+
|
|
9
|
+
__all__ = []
|
|
8
10
|
|
|
9
11
|
S = TypeVar("S", bound=Hashable)
|
|
10
12
|
T = TypeVar("T")
|
|
@@ -7,10 +7,10 @@ from openai import AsyncOpenAI, BadRequestError, InternalServerError, OpenAI, Ra
|
|
|
7
7
|
from openai.types.responses import ParsedResponse
|
|
8
8
|
from pydantic import BaseModel
|
|
9
9
|
|
|
10
|
-
from openaivec.
|
|
11
|
-
from openaivec.
|
|
12
|
-
from openaivec.
|
|
13
|
-
from openaivec.
|
|
10
|
+
from openaivec._log import observe
|
|
11
|
+
from openaivec._model import PreparedTask, ResponseFormat
|
|
12
|
+
from openaivec._proxy import AsyncBatchingMapProxy, BatchingMapProxy
|
|
13
|
+
from openaivec._util import backoff, backoff_async
|
|
14
14
|
|
|
15
15
|
__all__ = [
|
|
16
16
|
"BatchResponses",
|
|
@@ -29,7 +29,7 @@ from typing import Any, Dict, List, Literal, Type
|
|
|
29
29
|
|
|
30
30
|
from pydantic import BaseModel, Field, create_model
|
|
31
31
|
|
|
32
|
-
__all__ = [
|
|
32
|
+
__all__ = []
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
def serialize_base_model(obj: Type[BaseModel]) -> Dict[str, Any]:
|
openaivec/{util.py → _util.py}
RENAMED
openaivec/pandas_ext.py
CHANGED
|
@@ -48,13 +48,20 @@ import numpy as np
|
|
|
48
48
|
import pandas as pd
|
|
49
49
|
import tiktoken
|
|
50
50
|
from openai import AsyncOpenAI, OpenAI
|
|
51
|
+
|
|
52
|
+
__all__ = [
|
|
53
|
+
"embeddings_model",
|
|
54
|
+
"responses_model",
|
|
55
|
+
"use",
|
|
56
|
+
"use_async",
|
|
57
|
+
]
|
|
51
58
|
from pydantic import BaseModel
|
|
52
59
|
|
|
53
|
-
from openaivec.
|
|
54
|
-
from openaivec.
|
|
55
|
-
from openaivec.
|
|
56
|
-
from openaivec.
|
|
57
|
-
from openaivec.
|
|
60
|
+
from openaivec._embeddings import AsyncBatchEmbeddings, BatchEmbeddings
|
|
61
|
+
from openaivec._model import EmbeddingsModelName, PreparedTask, ResponseFormat, ResponsesModelName
|
|
62
|
+
from openaivec._provider import CONTAINER, _check_azure_v1_api_url
|
|
63
|
+
from openaivec._proxy import AsyncBatchingMapProxy, BatchingMapProxy
|
|
64
|
+
from openaivec._responses import AsyncBatchResponses, BatchResponses
|
|
58
65
|
from openaivec.task.table import FillNaResponse, fillna
|
|
59
66
|
|
|
60
67
|
__all__ = [
|
|
@@ -192,7 +199,7 @@ class OpenAIVecSeriesAccessor:
|
|
|
192
199
|
|
|
193
200
|
Example:
|
|
194
201
|
```python
|
|
195
|
-
from openaivec.
|
|
202
|
+
from openaivec._proxy import BatchingMapProxy
|
|
196
203
|
import numpy as np
|
|
197
204
|
|
|
198
205
|
# Create a shared cache with custom batch size
|
|
@@ -290,8 +297,8 @@ class OpenAIVecSeriesAccessor:
|
|
|
290
297
|
|
|
291
298
|
Example:
|
|
292
299
|
```python
|
|
293
|
-
from openaivec.
|
|
294
|
-
from openaivec.
|
|
300
|
+
from openaivec._model import PreparedTask
|
|
301
|
+
from openaivec._proxy import BatchingMapProxy
|
|
295
302
|
|
|
296
303
|
# Create a shared cache with custom batch size
|
|
297
304
|
shared_cache = BatchingMapProxy(batch_size=64)
|
|
@@ -323,7 +330,7 @@ class OpenAIVecSeriesAccessor:
|
|
|
323
330
|
|
|
324
331
|
Example:
|
|
325
332
|
```python
|
|
326
|
-
from openaivec.
|
|
333
|
+
from openaivec._model import PreparedTask
|
|
327
334
|
|
|
328
335
|
# Assume you have a prepared task for sentiment analysis
|
|
329
336
|
sentiment_task = PreparedTask(...)
|
|
@@ -510,7 +517,7 @@ class OpenAIVecDataFrameAccessor:
|
|
|
510
517
|
|
|
511
518
|
Example:
|
|
512
519
|
```python
|
|
513
|
-
from openaivec.
|
|
520
|
+
from openaivec._proxy import BatchingMapProxy
|
|
514
521
|
|
|
515
522
|
# Create a shared cache with custom batch size
|
|
516
523
|
shared_cache = BatchingMapProxy(batch_size=64)
|
|
@@ -607,7 +614,7 @@ class OpenAIVecDataFrameAccessor:
|
|
|
607
614
|
|
|
608
615
|
Example:
|
|
609
616
|
```python
|
|
610
|
-
from openaivec.
|
|
617
|
+
from openaivec._model import PreparedTask
|
|
611
618
|
|
|
612
619
|
# Assume you have a prepared task for data analysis
|
|
613
620
|
analysis_task = PreparedTask(...)
|
|
@@ -770,7 +777,7 @@ class AsyncOpenAIVecSeriesAccessor:
|
|
|
770
777
|
|
|
771
778
|
Example:
|
|
772
779
|
```python
|
|
773
|
-
from openaivec.
|
|
780
|
+
from openaivec._proxy import AsyncBatchingMapProxy
|
|
774
781
|
|
|
775
782
|
# Create a shared cache with custom batch size and concurrency
|
|
776
783
|
shared_cache = AsyncBatchingMapProxy(batch_size=64, max_concurrency=4)
|
|
@@ -822,7 +829,7 @@ class AsyncOpenAIVecSeriesAccessor:
|
|
|
822
829
|
|
|
823
830
|
Example:
|
|
824
831
|
```python
|
|
825
|
-
from openaivec.
|
|
832
|
+
from openaivec._proxy import AsyncBatchingMapProxy
|
|
826
833
|
import numpy as np
|
|
827
834
|
|
|
828
835
|
# Create a shared cache with custom batch size and concurrency
|
|
@@ -878,8 +885,8 @@ class AsyncOpenAIVecSeriesAccessor:
|
|
|
878
885
|
|
|
879
886
|
Example:
|
|
880
887
|
```python
|
|
881
|
-
from openaivec.
|
|
882
|
-
from openaivec.
|
|
888
|
+
from openaivec._model import PreparedTask
|
|
889
|
+
from openaivec._proxy import AsyncBatchingMapProxy
|
|
883
890
|
|
|
884
891
|
# Create a shared cache with custom batch size and concurrency
|
|
885
892
|
shared_cache = AsyncBatchingMapProxy(batch_size=64, max_concurrency=4)
|
|
@@ -1027,7 +1034,7 @@ class AsyncOpenAIVecSeriesAccessor:
|
|
|
1027
1034
|
|
|
1028
1035
|
Example:
|
|
1029
1036
|
```python
|
|
1030
|
-
from openaivec.
|
|
1037
|
+
from openaivec._model import PreparedTask
|
|
1031
1038
|
|
|
1032
1039
|
# Assume you have a prepared task for sentiment analysis
|
|
1033
1040
|
sentiment_task = PreparedTask(...)
|
|
@@ -1110,7 +1117,7 @@ class AsyncOpenAIVecDataFrameAccessor:
|
|
|
1110
1117
|
|
|
1111
1118
|
Example:
|
|
1112
1119
|
```python
|
|
1113
|
-
from openaivec.
|
|
1120
|
+
from openaivec._proxy import AsyncBatchingMapProxy
|
|
1114
1121
|
|
|
1115
1122
|
# Create a shared cache with custom batch size and concurrency
|
|
1116
1123
|
shared_cache = AsyncBatchingMapProxy(batch_size=64, max_concurrency=4)
|
|
@@ -1224,7 +1231,7 @@ class AsyncOpenAIVecDataFrameAccessor:
|
|
|
1224
1231
|
|
|
1225
1232
|
Example:
|
|
1226
1233
|
```python
|
|
1227
|
-
from openaivec.
|
|
1234
|
+
from openaivec._model import PreparedTask
|
|
1228
1235
|
|
|
1229
1236
|
# Assume you have a prepared task for data analysis
|
|
1230
1237
|
analysis_task = PreparedTask(...)
|
openaivec/spark.py
CHANGED
|
@@ -12,6 +12,15 @@ improved performance in I/O-bound operations.
|
|
|
12
12
|
automatically cache duplicate inputs within each partition, significantly reducing
|
|
13
13
|
API calls and costs when processing datasets with overlapping content.
|
|
14
14
|
|
|
15
|
+
__all__ = [
|
|
16
|
+
"count_tokens_udf",
|
|
17
|
+
"embeddings_udf",
|
|
18
|
+
"responses_udf",
|
|
19
|
+
"similarity_udf",
|
|
20
|
+
"split_to_chunks_udf",
|
|
21
|
+
"task_udf",
|
|
22
|
+
]
|
|
23
|
+
|
|
15
24
|
## Setup
|
|
16
25
|
|
|
17
26
|
First, obtain a Spark session and configure authentication:
|
|
@@ -127,10 +136,10 @@ from pyspark.sql.udf import UserDefinedFunction
|
|
|
127
136
|
from typing_extensions import Literal
|
|
128
137
|
|
|
129
138
|
from openaivec import pandas_ext
|
|
130
|
-
from openaivec.
|
|
131
|
-
from openaivec.
|
|
132
|
-
from openaivec.
|
|
133
|
-
from openaivec.
|
|
139
|
+
from openaivec._model import PreparedTask, ResponseFormat
|
|
140
|
+
from openaivec._proxy import AsyncBatchingMapProxy
|
|
141
|
+
from openaivec._serialize import deserialize_base_model, serialize_base_model
|
|
142
|
+
from openaivec._util import TextChunker
|
|
134
143
|
|
|
135
144
|
__all__ = [
|
|
136
145
|
"responses_udf",
|
openaivec/task/__init__.py
CHANGED
|
@@ -32,7 +32,7 @@ Specialized tasks for customer service operations:
|
|
|
32
32
|
### Quick Start with Default Tasks
|
|
33
33
|
```python
|
|
34
34
|
from openai import OpenAI
|
|
35
|
-
from openaivec.
|
|
35
|
+
from openaivec._responses import BatchResponses
|
|
36
36
|
from openaivec.task import nlp, customer_support
|
|
37
37
|
|
|
38
38
|
client = OpenAI()
|
|
@@ -9,7 +9,7 @@ Example:
|
|
|
9
9
|
|
|
10
10
|
```python
|
|
11
11
|
from openai import OpenAI
|
|
12
|
-
from openaivec.
|
|
12
|
+
from openaivec._responses import BatchResponses
|
|
13
13
|
from openaivec.task import customer_support
|
|
14
14
|
|
|
15
15
|
client = OpenAI()
|
|
@@ -65,7 +65,7 @@ from typing import List, Literal
|
|
|
65
65
|
|
|
66
66
|
from pydantic import BaseModel, Field
|
|
67
67
|
|
|
68
|
-
from openaivec.
|
|
68
|
+
from openaivec._model import PreparedTask
|
|
69
69
|
|
|
70
70
|
__all__ = ["customer_sentiment"]
|
|
71
71
|
|
|
@@ -8,7 +8,7 @@ Example:
|
|
|
8
8
|
|
|
9
9
|
```python
|
|
10
10
|
from openai import OpenAI
|
|
11
|
-
from openaivec.
|
|
11
|
+
from openaivec._responses import BatchResponses
|
|
12
12
|
from openaivec.task import customer_support
|
|
13
13
|
|
|
14
14
|
client = OpenAI()
|
|
@@ -96,7 +96,7 @@ from typing import Dict, List, Literal
|
|
|
96
96
|
|
|
97
97
|
from pydantic import BaseModel, Field
|
|
98
98
|
|
|
99
|
-
from openaivec.
|
|
99
|
+
from openaivec._model import PreparedTask
|
|
100
100
|
|
|
101
101
|
__all__ = ["inquiry_classification"]
|
|
102
102
|
|
|
@@ -9,7 +9,7 @@ Example:
|
|
|
9
9
|
|
|
10
10
|
```python
|
|
11
11
|
from openai import OpenAI
|
|
12
|
-
from openaivec.
|
|
12
|
+
from openaivec._responses import BatchResponses
|
|
13
13
|
from openaivec.task import customer_support
|
|
14
14
|
|
|
15
15
|
client = OpenAI()
|
|
@@ -63,7 +63,7 @@ from typing import List, Literal
|
|
|
63
63
|
|
|
64
64
|
from pydantic import BaseModel, Field
|
|
65
65
|
|
|
66
|
-
from openaivec.
|
|
66
|
+
from openaivec._model import PreparedTask
|
|
67
67
|
|
|
68
68
|
__all__ = ["inquiry_summary"]
|
|
69
69
|
|
|
@@ -8,7 +8,7 @@ Example:
|
|
|
8
8
|
|
|
9
9
|
```python
|
|
10
10
|
from openai import OpenAI
|
|
11
|
-
from openaivec.
|
|
11
|
+
from openaivec._responses import BatchResponses
|
|
12
12
|
from openaivec.task import customer_support
|
|
13
13
|
|
|
14
14
|
client = OpenAI()
|
|
@@ -61,7 +61,7 @@ from typing import List, Literal
|
|
|
61
61
|
|
|
62
62
|
from pydantic import BaseModel, Field
|
|
63
63
|
|
|
64
|
-
from openaivec.
|
|
64
|
+
from openaivec._model import PreparedTask
|
|
65
65
|
|
|
66
66
|
__all__ = ["intent_analysis"]
|
|
67
67
|
|
|
@@ -9,7 +9,7 @@ Example:
|
|
|
9
9
|
|
|
10
10
|
```python
|
|
11
11
|
from openai import OpenAI
|
|
12
|
-
from openaivec.
|
|
12
|
+
from openaivec._responses import BatchResponses
|
|
13
13
|
from openaivec.task import customer_support
|
|
14
14
|
|
|
15
15
|
client = OpenAI()
|
|
@@ -61,7 +61,7 @@ from typing import List, Literal
|
|
|
61
61
|
|
|
62
62
|
from pydantic import BaseModel, Field
|
|
63
63
|
|
|
64
|
-
from openaivec.
|
|
64
|
+
from openaivec._model import PreparedTask
|
|
65
65
|
|
|
66
66
|
__all__ = ["response_suggestion"]
|
|
67
67
|
|
|
@@ -8,7 +8,7 @@ Example:
|
|
|
8
8
|
|
|
9
9
|
```python
|
|
10
10
|
from openai import OpenAI
|
|
11
|
-
from openaivec.
|
|
11
|
+
from openaivec._responses import BatchResponses
|
|
12
12
|
from openaivec.task import customer_support
|
|
13
13
|
|
|
14
14
|
client = OpenAI()
|
|
@@ -100,7 +100,7 @@ from typing import Dict, List, Literal
|
|
|
100
100
|
|
|
101
101
|
from pydantic import BaseModel, Field
|
|
102
102
|
|
|
103
|
-
from openaivec.
|
|
103
|
+
from openaivec._model import PreparedTask
|
|
104
104
|
|
|
105
105
|
__all__ = ["urgency_analysis"]
|
|
106
106
|
|
|
@@ -8,7 +8,7 @@ Example:
|
|
|
8
8
|
|
|
9
9
|
```python
|
|
10
10
|
from openai import OpenAI
|
|
11
|
-
from openaivec.
|
|
11
|
+
from openaivec._responses import BatchResponses
|
|
12
12
|
from openaivec.task import nlp
|
|
13
13
|
|
|
14
14
|
client = OpenAI()
|
|
@@ -52,7 +52,7 @@ from typing import List
|
|
|
52
52
|
|
|
53
53
|
from pydantic import BaseModel, Field
|
|
54
54
|
|
|
55
|
-
from openaivec.
|
|
55
|
+
from openaivec._model import PreparedTask
|
|
56
56
|
|
|
57
57
|
__all__ = ["DEPENDENCY_PARSING"]
|
|
58
58
|
|
|
@@ -8,7 +8,7 @@ Example:
|
|
|
8
8
|
|
|
9
9
|
```python
|
|
10
10
|
from openai import OpenAI
|
|
11
|
-
from openaivec.
|
|
11
|
+
from openaivec._responses import BatchResponses
|
|
12
12
|
from openaivec.task import nlp
|
|
13
13
|
|
|
14
14
|
client = OpenAI()
|
|
@@ -54,7 +54,7 @@ from typing import List
|
|
|
54
54
|
|
|
55
55
|
from pydantic import BaseModel, Field
|
|
56
56
|
|
|
57
|
-
from openaivec.
|
|
57
|
+
from openaivec._model import PreparedTask
|
|
58
58
|
|
|
59
59
|
__all__ = ["KEYWORD_EXTRACTION"]
|
|
60
60
|
|
|
@@ -9,7 +9,7 @@ Example:
|
|
|
9
9
|
|
|
10
10
|
```python
|
|
11
11
|
from openai import OpenAI
|
|
12
|
-
from openaivec.
|
|
12
|
+
from openaivec._responses import BatchResponses
|
|
13
13
|
from openaivec.task import nlp
|
|
14
14
|
|
|
15
15
|
client = OpenAI()
|
|
@@ -53,7 +53,7 @@ from typing import List
|
|
|
53
53
|
|
|
54
54
|
from pydantic import BaseModel, Field
|
|
55
55
|
|
|
56
|
-
from openaivec.
|
|
56
|
+
from openaivec._model import PreparedTask
|
|
57
57
|
|
|
58
58
|
__all__ = ["MORPHOLOGICAL_ANALYSIS"]
|
|
59
59
|
|
|
@@ -8,7 +8,7 @@ Example:
|
|
|
8
8
|
|
|
9
9
|
```python
|
|
10
10
|
from openai import OpenAI
|
|
11
|
-
from openaivec.
|
|
11
|
+
from openaivec._responses import BatchResponses
|
|
12
12
|
from openaivec.task import nlp
|
|
13
13
|
|
|
14
14
|
client = OpenAI()
|
|
@@ -52,7 +52,7 @@ from typing import List
|
|
|
52
52
|
|
|
53
53
|
from pydantic import BaseModel, Field
|
|
54
54
|
|
|
55
|
-
from openaivec.
|
|
55
|
+
from openaivec._model import PreparedTask
|
|
56
56
|
|
|
57
57
|
__all__ = ["NAMED_ENTITY_RECOGNITION"]
|
|
58
58
|
|
|
@@ -8,7 +8,7 @@ Example:
|
|
|
8
8
|
|
|
9
9
|
```python
|
|
10
10
|
from openai import OpenAI
|
|
11
|
-
from openaivec.
|
|
11
|
+
from openaivec._responses import BatchResponses
|
|
12
12
|
from openaivec.task import nlp
|
|
13
13
|
|
|
14
14
|
client = OpenAI()
|
|
@@ -52,7 +52,7 @@ from typing import List, Literal
|
|
|
52
52
|
|
|
53
53
|
from pydantic import BaseModel, Field
|
|
54
54
|
|
|
55
|
-
from openaivec.
|
|
55
|
+
from openaivec._model import PreparedTask
|
|
56
56
|
|
|
57
57
|
__all__ = ["SENTIMENT_ANALYSIS"]
|
|
58
58
|
|
|
@@ -13,7 +13,7 @@ Example:
|
|
|
13
13
|
|
|
14
14
|
```python
|
|
15
15
|
from openai import OpenAI
|
|
16
|
-
from openaivec.
|
|
16
|
+
from openaivec._responses import BatchResponses
|
|
17
17
|
from openaivec.task import nlp
|
|
18
18
|
|
|
19
19
|
client = OpenAI()
|
|
@@ -75,7 +75,7 @@ Note:
|
|
|
75
75
|
from openai import BaseModel
|
|
76
76
|
from pydantic import Field
|
|
77
77
|
|
|
78
|
-
from openaivec.
|
|
78
|
+
from openaivec._model import PreparedTask
|
|
79
79
|
|
|
80
80
|
__all__ = ["MULTILINGUAL_TRANSLATION"]
|
|
81
81
|
|
openaivec/task/table/fillna.py
CHANGED
|
@@ -33,7 +33,7 @@ Example:
|
|
|
33
33
|
|
|
34
34
|
```python
|
|
35
35
|
from openai import OpenAI
|
|
36
|
-
from openaivec.
|
|
36
|
+
from openaivec._responses import BatchResponses
|
|
37
37
|
from openaivec.task.table import fillna
|
|
38
38
|
|
|
39
39
|
client = OpenAI()
|
|
@@ -70,8 +70,8 @@ from typing import Dict, List
|
|
|
70
70
|
import pandas as pd
|
|
71
71
|
from pydantic import BaseModel, Field
|
|
72
72
|
|
|
73
|
-
from openaivec.
|
|
74
|
-
from openaivec.
|
|
73
|
+
from openaivec._model import PreparedTask
|
|
74
|
+
from openaivec._prompt import FewShotPromptBuilder
|
|
75
75
|
|
|
76
76
|
__all__ = ["fillna", "FillNaResponse"]
|
|
77
77
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: openaivec
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.14.0
|
|
4
4
|
Summary: Generative mutation for tabular calculation
|
|
5
5
|
Project-URL: Homepage, https://microsoft.github.io/openaivec/
|
|
6
6
|
Project-URL: Repository, https://github.com/microsoft/openaivec
|
|
@@ -514,7 +514,7 @@ return rendered prompt with XML format.
|
|
|
514
514
|
Here is an example:
|
|
515
515
|
|
|
516
516
|
```python
|
|
517
|
-
from openaivec
|
|
517
|
+
from openaivec import FewShotPromptBuilder
|
|
518
518
|
|
|
519
519
|
prompt: str = (
|
|
520
520
|
FewShotPromptBuilder()
|
|
@@ -577,7 +577,7 @@ Here is an example:
|
|
|
577
577
|
|
|
578
578
|
```python
|
|
579
579
|
from openai import OpenAI
|
|
580
|
-
from openaivec
|
|
580
|
+
from openaivec import FewShotPromptBuilder
|
|
581
581
|
|
|
582
582
|
client = OpenAI(...)
|
|
583
583
|
model_name = "<your-model-name>"
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
openaivec/__init__.py,sha256=mXCGNNTjYbmE4CAXGvAs78soxUsoy_mxxnvaCk_CL6Y,361
|
|
2
|
+
openaivec/_di.py,sha256=DsVeD-IJuAF3HS2OtHtQJ0BtWXyqzZeeNi7LDMWO3W0,10648
|
|
3
|
+
openaivec/_embeddings.py,sha256=6lZJG1U8CExdPpXt9ZNET4IXAEWvwhPFjztMR3FIFH4,7473
|
|
4
|
+
openaivec/_log.py,sha256=1qhc9CF4D4bwiF_VWHilcYBPcTqIKyI0zuNEfn0MLNA,1430
|
|
5
|
+
openaivec/_model.py,sha256=xg3s9Ljqb2xK1t_a5bwWxGJfFSIuaNrFGMgQq4nQKrM,3351
|
|
6
|
+
openaivec/_optimize.py,sha256=-mKjD5YV_d1Z2nqfGfAcmx6mTKn6AODjFTrIKJPbAXQ,3851
|
|
7
|
+
openaivec/_prompt.py,sha256=KoJbFK4gTEDRtu9OMweJq_jQLkSPFy2Kcvao30qKhAQ,20844
|
|
8
|
+
openaivec/_provider.py,sha256=dNr9Y2C97GK-pkY81odurKoDup59dLK31V3EGT2HOwE,6711
|
|
9
|
+
openaivec/_proxy.py,sha256=giOxRlCCO11XQ0gNVf2IksjZZj9RwvTHkHbmbQXadEk,28916
|
|
10
|
+
openaivec/_responses.py,sha256=SSa52mCYh2jF52pHaXRtj0tJQUEn52Uy8ypMT57vSks,21428
|
|
11
|
+
openaivec/_serialize.py,sha256=mSuSVfSpXMnsFZ4JjlOEe5b22ttBUHviPs9mF99lf0A,7277
|
|
12
|
+
openaivec/_util.py,sha256=dFWwjouJyvF-tqNPs2933OAt5Fw9I2Q2BvmGIfGH5k4,6423
|
|
13
|
+
openaivec/pandas_ext.py,sha256=xOZvuJN6qPQZZmaHKr870kelG2XmuFHkqeAbFNayUZU,58825
|
|
14
|
+
openaivec/spark.py,sha256=MqzS8nZe6R3wT_QJdopYSMZWDpagN6gyJNh-CAtvHA8,24403
|
|
15
|
+
openaivec/task/__init__.py,sha256=lrgoc9UIox7XnxZ96dQRl88a-8QfuZRFBHshxctpMB8,6178
|
|
16
|
+
openaivec/task/customer_support/__init__.py,sha256=KWfGyXPdZyfGdRH17x7hPpJJ1N2EP9PPhZx0fvBAwSI,884
|
|
17
|
+
openaivec/task/customer_support/customer_sentiment.py,sha256=r_NJEz11zdMCw6x8S2jqEhcFZSJDn0Plgf0ED8JlvxQ,7618
|
|
18
|
+
openaivec/task/customer_support/inquiry_classification.py,sha256=QLaZY8SP22Yf5OxhmTLn_TH96dw4hxnyShvq8mEiBC8,9646
|
|
19
|
+
openaivec/task/customer_support/inquiry_summary.py,sha256=Rx9JlyfZgyIef3m-2SYerrYg6-0adB7W9rPBxkKlViM,6926
|
|
20
|
+
openaivec/task/customer_support/intent_analysis.py,sha256=-M_zCkMGib7s2f2rtHOrUk5C_OHb_wL8wCFhiAa5X-o,7510
|
|
21
|
+
openaivec/task/customer_support/response_suggestion.py,sha256=NRAeZwhZUXKiHaq0eMN5ACLQT6qcVQVx0vXLaVll_hQ,8350
|
|
22
|
+
openaivec/task/customer_support/urgency_analysis.py,sha256=teJDnvSEN5IYq1h-80Sk0og2JyAeWbUr3Wwkw2mB5Sk,11575
|
|
23
|
+
openaivec/task/nlp/__init__.py,sha256=QoQ0egEK9IEh5hdrE07rZ_KCmC0gy_2FPrWJYRWiipY,512
|
|
24
|
+
openaivec/task/nlp/dependency_parsing.py,sha256=BuuPaL0KmRzi4rBZyzH3q1snSQwvUY8jqmcVq17w6zE,2842
|
|
25
|
+
openaivec/task/nlp/keyword_extraction.py,sha256=VfbxPqCGd7R8pxNpwJtHEPY3EdxtMGNBhPxhg_fbL18,2829
|
|
26
|
+
openaivec/task/nlp/morphological_analysis.py,sha256=43QJ3g5oEXUOiW6uFaEDaQMVI3njQ_GCWf3DKLyzsPQ,2426
|
|
27
|
+
openaivec/task/nlp/named_entity_recognition.py,sha256=oC6GuvfITlK-izTXoGGpYxVSOrcM1GRGypMANKGGhK8,3062
|
|
28
|
+
openaivec/task/nlp/sentiment_analysis.py,sha256=BNwWtNT-MNA76eIJbb31641upukmRwM9ajfz8x398gE,3091
|
|
29
|
+
openaivec/task/nlp/translation.py,sha256=XTZM11JFjbgTK9wHnxFgVDabXZ5bqbabXK_bq2nEkyQ,6627
|
|
30
|
+
openaivec/task/table/__init__.py,sha256=kJz15WDJXjyC7UIHKBvlTRhCf347PCDMH5T5fONV2sU,83
|
|
31
|
+
openaivec/task/table/fillna.py,sha256=hQn619rZoed0YJb9dX1uOKxvnfJtWy0yptzGC4yljCw,6585
|
|
32
|
+
openaivec-0.14.0.dist-info/METADATA,sha256=R3pr1Ibcqn0MZnEwQqwlqRvss8oS8zas7lWksqUUTSk,27552
|
|
33
|
+
openaivec-0.14.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
34
|
+
openaivec-0.14.0.dist-info/licenses/LICENSE,sha256=ws_MuBL-SCEBqPBFl9_FqZkaaydIJmxHrJG2parhU4M,1141
|
|
35
|
+
openaivec-0.14.0.dist-info/RECORD,,
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
openaivec/__init__.py,sha256=DQcfTw7y4CgPtyyMg-wO4chwVYT0jA_F-EjxT_bXxTg,236
|
|
2
|
-
openaivec/di.py,sha256=eNewaSRx7f_O0IQcyjzGpIMak6O-bc6OeMqjytCfr88,10634
|
|
3
|
-
openaivec/embeddings.py,sha256=ntnsdV2L6WAT4nKqgL3MZfhqf_Xnfu_J8oFavjIVcIU,7470
|
|
4
|
-
openaivec/log.py,sha256=GofgzUpv_xDVuGC-gYmit5Oyu06it1SBXRck6COR5go,1439
|
|
5
|
-
openaivec/model.py,sha256=u1zQLF__Qw9mp92K1LYaAaQEYisMZoMWuX9-dx2JYoE,3316
|
|
6
|
-
openaivec/optimize.py,sha256=jjE-_ZOs_BPuSHHYVoykGHqTF04nlYkz_rFZ0Kcwtdc,3837
|
|
7
|
-
openaivec/pandas_ext.py,sha256=QlTSZkVzVwO1MFAGv_MuFaINpXlxYjkbfO0zCsmbmSM,58717
|
|
8
|
-
openaivec/prompt.py,sha256=ZzHOS2CRLRtPeP4Z734xkaAA5LFcfmhkDQE5URQUidQ,20842
|
|
9
|
-
openaivec/provider.py,sha256=BYsJxioaemDpjOYdNuLMtasi54Je6LNrtyYupHTxWLA,6688
|
|
10
|
-
openaivec/proxy.py,sha256=jsWUqEJVlRHj0854GlvAzG09mm-QmFFNREXeMOc1LsY,28901
|
|
11
|
-
openaivec/responses.py,sha256=v4MtyIh_g6bahmkq1Ra4y63Tlqg6-Ace1SErmoosvMg,21424
|
|
12
|
-
openaivec/serialize.py,sha256=HXi5l_4b_4eUMNL7f7o_suyHHF_hz3RYsUsri5CQ7_4,7325
|
|
13
|
-
openaivec/spark.py,sha256=uxXXgOhH1g_HEnBIuNGLlKPInJwZBCLaqrTnJT2UHk4,24252
|
|
14
|
-
openaivec/util.py,sha256=A7-QSoGkdllH6e6CVHxuGk-fmAmsSCSZVSJ5VSDzmx4,6409
|
|
15
|
-
openaivec/task/__init__.py,sha256=26Kd2eRRfUqRJnYH83sRrbuEuRwshypRRSkTWtT50Tw,6177
|
|
16
|
-
openaivec/task/customer_support/__init__.py,sha256=KWfGyXPdZyfGdRH17x7hPpJJ1N2EP9PPhZx0fvBAwSI,884
|
|
17
|
-
openaivec/task/customer_support/customer_sentiment.py,sha256=vf2GzUk_06JD1FeRTetg5bCcBFUSqH349J1TI5lsgkg,7616
|
|
18
|
-
openaivec/task/customer_support/inquiry_classification.py,sha256=F86-wBMjHn_PtUDT9N6LHmxRGkYMd3huT-KrqZAogCg,9644
|
|
19
|
-
openaivec/task/customer_support/inquiry_summary.py,sha256=bZV8pvPAdiijqMnaUMg_jGie0dsEHgnEUvqhunyP0CY,6924
|
|
20
|
-
openaivec/task/customer_support/intent_analysis.py,sha256=i8S19z_-Dgz9rspiDTE0TShmExYE9y6ZCr8ipmHvC4A,7508
|
|
21
|
-
openaivec/task/customer_support/response_suggestion.py,sha256=L3NJLqyFafxEsW3QD0MIiE-MB4akwoDW6nuWOWJQpyE,8348
|
|
22
|
-
openaivec/task/customer_support/urgency_analysis.py,sha256=_llRrS11BJ392Xz0dXqr5i1jggTjgvtpKDEwUoY2KaE,11573
|
|
23
|
-
openaivec/task/nlp/__init__.py,sha256=QoQ0egEK9IEh5hdrE07rZ_KCmC0gy_2FPrWJYRWiipY,512
|
|
24
|
-
openaivec/task/nlp/dependency_parsing.py,sha256=7JczHzibWARPwo7h81N2Qk9h-3AnLmMkVsJ1cZp1w6Q,2840
|
|
25
|
-
openaivec/task/nlp/keyword_extraction.py,sha256=bPI0mYzgZ3pXEBusOpSpoi_Zs84ccQXknS_nB7Bwy7I,2827
|
|
26
|
-
openaivec/task/nlp/morphological_analysis.py,sha256=DvJhJge7r_oEYfb0Siq-x9rioCWYBVw6wroTdGkqInk,2424
|
|
27
|
-
openaivec/task/nlp/named_entity_recognition.py,sha256=ehT1SYGsBrviPLVKk2veMKoxdS4CTx89FefAwN2jA4s,3060
|
|
28
|
-
openaivec/task/nlp/sentiment_analysis.py,sha256=9HdMpi7FkjHNXAswaN98k8jeKsatBBXTPaTmp9VI7mE,3089
|
|
29
|
-
openaivec/task/nlp/translation.py,sha256=4fjKtbVvOvivWMrpZfreIsdg8d0DplDujO8kAdLbAKI,6625
|
|
30
|
-
openaivec/task/table/__init__.py,sha256=kJz15WDJXjyC7UIHKBvlTRhCf347PCDMH5T5fONV2sU,83
|
|
31
|
-
openaivec/task/table/fillna.py,sha256=vi8t5QEIU-W3e05wwpATb3MEUDyf8luVnE8U-5VebZo,6582
|
|
32
|
-
openaivec-0.13.6.dist-info/METADATA,sha256=JDjFmGAcoqSIeoK5JSEQ0Kd98HVRHW_DPwiUvsheDIU,27566
|
|
33
|
-
openaivec-0.13.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
34
|
-
openaivec-0.13.6.dist-info/licenses/LICENSE,sha256=ws_MuBL-SCEBqPBFl9_FqZkaaydIJmxHrJG2parhU4M,1141
|
|
35
|
-
openaivec-0.13.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|