openaivec 0.13.6__py3-none-any.whl → 0.13.7__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 CHANGED
@@ -1,9 +1,14 @@
1
1
  from .embeddings import AsyncBatchEmbeddings, BatchEmbeddings
2
+ from .model import PreparedTask
3
+ from .prompt import FewShotPrompt, FewShotPromptBuilder
2
4
  from .responses import AsyncBatchResponses, BatchResponses
3
5
 
4
6
  __all__ = [
5
- "BatchResponses",
7
+ "AsyncBatchEmbeddings",
6
8
  "AsyncBatchResponses",
7
9
  "BatchEmbeddings",
8
- "AsyncBatchEmbeddings",
10
+ "BatchResponses",
11
+ "FewShotPrompt",
12
+ "FewShotPromptBuilder",
13
+ "PreparedTask",
9
14
  ]
openaivec/di.py CHANGED
@@ -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
openaivec/log.py CHANGED
@@ -5,7 +5,7 @@ import uuid
5
5
  from logging import Logger
6
6
  from typing import Callable
7
7
 
8
- __all__ = ["observe"]
8
+ __all__ = []
9
9
 
10
10
 
11
11
  def observe(logger: Logger):
openaivec/model.py CHANGED
@@ -1,6 +1,10 @@
1
1
  from dataclasses import dataclass
2
2
  from typing import Generic, Type, TypeVar
3
3
 
4
+ __all__ = [
5
+ "PreparedTask",
6
+ ]
7
+
4
8
  ResponseFormat = TypeVar("ResponseFormat")
5
9
 
6
10
 
openaivec/optimize.py CHANGED
@@ -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.1
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)
openaivec/pandas_ext.py CHANGED
@@ -48,6 +48,13 @@ 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
60
  from openaivec.embeddings import AsyncBatchEmbeddings, BatchEmbeddings
openaivec/provider.py CHANGED
@@ -15,6 +15,8 @@ from openaivec.model import (
15
15
  )
16
16
  from openaivec.util import TextChunker
17
17
 
18
+ __all__ = []
19
+
18
20
  CONTAINER = di.Container()
19
21
 
20
22
 
openaivec/proxy.py CHANGED
@@ -6,6 +6,8 @@ from typing import Any, Awaitable, Callable, Dict, Generic, List, TypeVar
6
6
 
7
7
  from openaivec.optimize import BatchSizeSuggester
8
8
 
9
+ __all__ = []
10
+
9
11
  S = TypeVar("S", bound=Hashable)
10
12
  T = TypeVar("T")
11
13
 
openaivec/serialize.py CHANGED
@@ -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__ = ["deserialize_base_model", "serialize_base_model"]
32
+ __all__ = []
33
33
 
34
34
 
35
35
  def serialize_base_model(obj: Type[BaseModel]) -> Dict[str, Any]:
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:
openaivec/util.py CHANGED
@@ -8,6 +8,8 @@ from typing import Awaitable, Callable, List, Type, TypeVar
8
8
  import numpy as np
9
9
  import tiktoken
10
10
 
11
+ __all__ = []
12
+
11
13
  T = TypeVar("T")
12
14
  U = TypeVar("U")
13
15
  V = TypeVar("V")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openaivec
3
- Version: 0.13.6
3
+ Version: 0.13.7
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
@@ -1,17 +1,17 @@
1
- openaivec/__init__.py,sha256=DQcfTw7y4CgPtyyMg-wO4chwVYT0jA_F-EjxT_bXxTg,236
2
- openaivec/di.py,sha256=eNewaSRx7f_O0IQcyjzGpIMak6O-bc6OeMqjytCfr88,10634
1
+ openaivec/__init__.py,sha256=2nPIsylGgJcBXgrKrGzuThgw0Ycajlvf-bSzSCtg_ng,393
2
+ openaivec/di.py,sha256=DsVeD-IJuAF3HS2OtHtQJ0BtWXyqzZeeNi7LDMWO3W0,10648
3
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
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/pandas_ext.py,sha256=bvAG_2Uf39iNOAn4lSRXO63LoaMEI1J6t8kRSy_LK40,58807
8
8
  openaivec/prompt.py,sha256=ZzHOS2CRLRtPeP4Z734xkaAA5LFcfmhkDQE5URQUidQ,20842
9
- openaivec/provider.py,sha256=BYsJxioaemDpjOYdNuLMtasi54Je6LNrtyYupHTxWLA,6688
10
- openaivec/proxy.py,sha256=jsWUqEJVlRHj0854GlvAzG09mm-QmFFNREXeMOc1LsY,28901
9
+ openaivec/provider.py,sha256=sEPf3g9Lhq66PaoEkpJdOVd9yG_PTCW3BU_qYuvZFjQ,6702
10
+ openaivec/proxy.py,sha256=1evFOBifsn4Ecf-3GcFeQjt_dHlSV0iC6gxs-QjMCHk,28915
11
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
12
+ openaivec/serialize.py,sha256=mSuSVfSpXMnsFZ4JjlOEe5b22ttBUHviPs9mF99lf0A,7277
13
+ openaivec/spark.py,sha256=sBD4fiX-4ejf_m0SCWgv_e-aGptCwyuQ4FfvnxlT09g,24399
14
+ openaivec/util.py,sha256=dFWwjouJyvF-tqNPs2933OAt5Fw9I2Q2BvmGIfGH5k4,6423
15
15
  openaivec/task/__init__.py,sha256=26Kd2eRRfUqRJnYH83sRrbuEuRwshypRRSkTWtT50Tw,6177
16
16
  openaivec/task/customer_support/__init__.py,sha256=KWfGyXPdZyfGdRH17x7hPpJJ1N2EP9PPhZx0fvBAwSI,884
17
17
  openaivec/task/customer_support/customer_sentiment.py,sha256=vf2GzUk_06JD1FeRTetg5bCcBFUSqH349J1TI5lsgkg,7616
@@ -29,7 +29,7 @@ openaivec/task/nlp/sentiment_analysis.py,sha256=9HdMpi7FkjHNXAswaN98k8jeKsatBBXT
29
29
  openaivec/task/nlp/translation.py,sha256=4fjKtbVvOvivWMrpZfreIsdg8d0DplDujO8kAdLbAKI,6625
30
30
  openaivec/task/table/__init__.py,sha256=kJz15WDJXjyC7UIHKBvlTRhCf347PCDMH5T5fONV2sU,83
31
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,,
32
+ openaivec-0.13.7.dist-info/METADATA,sha256=4_OtOhijWBx952u7owZwpsf3S5MtPsieGVo3s5v_v7w,27566
33
+ openaivec-0.13.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
34
+ openaivec-0.13.7.dist-info/licenses/LICENSE,sha256=ws_MuBL-SCEBqPBFl9_FqZkaaydIJmxHrJG2parhU4M,1141
35
+ openaivec-0.13.7.dist-info/RECORD,,