mostlyai-mock 0.1.15__py3-none-any.whl → 0.1.16__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.
- mostlyai/mock/__init__.py +1 -1
- mostlyai/mock/core.py +28 -10
- mostlyai/mock/mcp_server.py +1 -1
- {mostlyai_mock-0.1.15.dist-info → mostlyai_mock-0.1.16.dist-info}/METADATA +5 -5
- mostlyai_mock-0.1.16.dist-info/RECORD +8 -0
- mostlyai_mock-0.1.15.dist-info/RECORD +0 -8
- {mostlyai_mock-0.1.15.dist-info → mostlyai_mock-0.1.16.dist-info}/WHEEL +0 -0
- {mostlyai_mock-0.1.15.dist-info → mostlyai_mock-0.1.16.dist-info}/entry_points.txt +0 -0
- {mostlyai_mock-0.1.15.dist-info → mostlyai_mock-0.1.16.dist-info}/licenses/LICENSE +0 -0
mostlyai/mock/__init__.py
CHANGED
mostlyai/mock/core.py
CHANGED
@@ -645,6 +645,24 @@ async def _worker(
|
|
645
645
|
"stream": True,
|
646
646
|
}
|
647
647
|
|
648
|
+
# support for openai reasoning models
|
649
|
+
model_only = llm_config.model.split("/")[-1] if "/" in llm_config.model else llm_config.model
|
650
|
+
reasoning_effort = (
|
651
|
+
"low"
|
652
|
+
if (model_only.startswith("o") and (model_only[1:].isdigit() or model_only[1:].split("-")[0].isdigit()))
|
653
|
+
else "minimal"
|
654
|
+
if (
|
655
|
+
model_only.startswith("gpt-")
|
656
|
+
and model_only.split("-")[1].isdigit()
|
657
|
+
and int(model_only.split("-")[1]) >= 5
|
658
|
+
)
|
659
|
+
else None
|
660
|
+
)
|
661
|
+
|
662
|
+
if reasoning_effort:
|
663
|
+
litellm_kwargs.pop("top_p")
|
664
|
+
litellm_kwargs["reasoning_effort"] = reasoning_effort
|
665
|
+
|
648
666
|
# construct messages
|
649
667
|
system_prompt = _create_system_prompt(llm_output_format)
|
650
668
|
user_prompt = _create_table_prompt(
|
@@ -1116,7 +1134,7 @@ async def _sample_common(
|
|
1116
1134
|
tables: dict[str, dict],
|
1117
1135
|
sample_size: int | dict[str, int] = 4,
|
1118
1136
|
existing_data: dict[str, pd.DataFrame] | None = None,
|
1119
|
-
model: str = "openai/gpt-
|
1137
|
+
model: str = "openai/gpt-5-nano",
|
1120
1138
|
api_key: str | None = None,
|
1121
1139
|
temperature: float = 1.0,
|
1122
1140
|
top_p: float = 0.95,
|
@@ -1164,7 +1182,7 @@ def sample(
|
|
1164
1182
|
tables: dict[str, dict],
|
1165
1183
|
sample_size: int | dict[str, int] = 4,
|
1166
1184
|
existing_data: dict[str, pd.DataFrame] | None = None,
|
1167
|
-
model: str = "openai/gpt-
|
1185
|
+
model: str = "openai/gpt-5-nano",
|
1168
1186
|
api_key: str | None = None,
|
1169
1187
|
temperature: float = 1.0,
|
1170
1188
|
top_p: float = 0.95,
|
@@ -1194,9 +1212,9 @@ def sample(
|
|
1194
1212
|
Default is None.
|
1195
1213
|
model (str): The LiteLLM chat completion model to be used.
|
1196
1214
|
Examples include:
|
1197
|
-
- `openai/gpt-
|
1198
|
-
- `openai/gpt-
|
1199
|
-
- `openai/gpt-
|
1215
|
+
- `openai/gpt-5-nano` (default; fast, and smart)
|
1216
|
+
- `openai/gpt-5-mini` (slower, but smarter)
|
1217
|
+
- `openai/gpt-5` (slowest, but smartest)
|
1200
1218
|
- `gemini/gemini-2.0-flash`
|
1201
1219
|
- `gemini/gemini-2.5-flash-preview-04-17`
|
1202
1220
|
- 'groq/gemma2-9b-it`
|
@@ -1234,7 +1252,7 @@ def sample(
|
|
1234
1252
|
},
|
1235
1253
|
}
|
1236
1254
|
}
|
1237
|
-
df = mock.sample(tables=tables, sample_size=10, model="openai/gpt-
|
1255
|
+
df = mock.sample(tables=tables, sample_size=10, model="openai/gpt-5-nano")
|
1238
1256
|
```
|
1239
1257
|
|
1240
1258
|
Example of generating mock data for multiple tables (with PK/FK relationships):
|
@@ -1297,7 +1315,7 @@ def sample(
|
|
1297
1315
|
],
|
1298
1316
|
},
|
1299
1317
|
}
|
1300
|
-
data = mock.sample(tables=tables, sample_size=2, model="openai/gpt-
|
1318
|
+
data = mock.sample(tables=tables, sample_size=2, model="openai/gpt-5")
|
1301
1319
|
df_customers = data["customers"]
|
1302
1320
|
df_warehouses = data["warehouses"]
|
1303
1321
|
df_orders = data["orders"]
|
@@ -1326,7 +1344,7 @@ def sample(
|
|
1326
1344
|
enriched_df = mock.sample(
|
1327
1345
|
tables=tables,
|
1328
1346
|
existing_data={"patients": existing_df},
|
1329
|
-
model="openai/gpt-
|
1347
|
+
model="openai/gpt-5-nano"
|
1330
1348
|
)
|
1331
1349
|
enriched_df
|
1332
1350
|
```
|
@@ -1381,7 +1399,7 @@ def sample(
|
|
1381
1399
|
"customers": existing_customers,
|
1382
1400
|
"orders": existing_orders,
|
1383
1401
|
},
|
1384
|
-
model="openai/gpt-
|
1402
|
+
model="openai/gpt-5-nano"
|
1385
1403
|
)
|
1386
1404
|
df_customers = data["customers"]
|
1387
1405
|
df_orders = data["orders"]
|
@@ -1413,7 +1431,7 @@ async def _asample(
|
|
1413
1431
|
tables: dict[str, dict],
|
1414
1432
|
sample_size: int | dict[str, int] = 4,
|
1415
1433
|
existing_data: dict[str, pd.DataFrame] | None = None,
|
1416
|
-
model: str = "openai/gpt-
|
1434
|
+
model: str = "openai/gpt-5-nano",
|
1417
1435
|
api_key: str | None = None,
|
1418
1436
|
temperature: float = 1.0,
|
1419
1437
|
top_p: float = 0.95,
|
mostlyai/mock/mcp_server.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: mostlyai-mock
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.16
|
4
4
|
Summary: Synthetic Mock Data
|
5
5
|
Project-URL: homepage, https://github.com/mostly-ai/mostlyai-mock
|
6
6
|
Project-URL: repository, https://github.com/mostly-ai/mostlyai-mock
|
@@ -95,7 +95,7 @@ tables = {
|
|
95
95
|
df = mock.sample(
|
96
96
|
tables=tables, # provide table and column definitions
|
97
97
|
sample_size=10, # generate 10 records
|
98
|
-
model="openai/gpt-
|
98
|
+
model="openai/gpt-5-nano", # select the LLM model (optional)
|
99
99
|
)
|
100
100
|
print(df)
|
101
101
|
# nationality name gender age date_of_birth checkin_time is_vip price_per_night room_number
|
@@ -176,7 +176,7 @@ tables = {
|
|
176
176
|
data = mock.sample(
|
177
177
|
tables=tables,
|
178
178
|
sample_size=2,
|
179
|
-
model="openai/gpt-
|
179
|
+
model="openai/gpt-5",
|
180
180
|
n_workers=1,
|
181
181
|
)
|
182
182
|
print(data["customers"])
|
@@ -232,7 +232,7 @@ tables = {
|
|
232
232
|
],
|
233
233
|
}
|
234
234
|
}
|
235
|
-
df = mock.sample(tables=tables, sample_size=10, model="openai/gpt-
|
235
|
+
df = mock.sample(tables=tables, sample_size=10, model="openai/gpt-5", n_workers=1)
|
236
236
|
print(df)
|
237
237
|
# employee_id name boss_id role
|
238
238
|
# 0 B0-1 Patricia Lee <NA> President
|
@@ -273,7 +273,7 @@ existing_guests = pd.DataFrame({
|
|
273
273
|
df = mock.sample(
|
274
274
|
tables=tables,
|
275
275
|
existing_data={"guests": existing_guests},
|
276
|
-
model="openai/gpt-
|
276
|
+
model="openai/gpt-5-nano"
|
277
277
|
)
|
278
278
|
print(df)
|
279
279
|
# guest_id name nationality gender age room_number is_vip
|
@@ -0,0 +1,8 @@
|
|
1
|
+
mostlyai/mock/__init__.py,sha256=XEezyGjkXQBReW_ORi83H2WEVhLolDDLbGjxA2g2yEs,715
|
2
|
+
mostlyai/mock/core.py,sha256=FTF0BfJowxNHm_L0RpTk6BhS1mXzvjELP-3Z96aFVMQ,62454
|
3
|
+
mostlyai/mock/mcp_server.py,sha256=uDLg0SeMPV2VZhXviM-F769W0xlmhGwlmQiQhY0Q-Ik,2365
|
4
|
+
mostlyai_mock-0.1.16.dist-info/METADATA,sha256=CT6lcz2cAq5W-u3VjQLr_Dg8VbuEtU-JlvsXg5OsKTk,14297
|
5
|
+
mostlyai_mock-0.1.16.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
6
|
+
mostlyai_mock-0.1.16.dist-info/entry_points.txt,sha256=XDbppUIAaCWW0nresVep8zb71pkzZuFA16jCBHq8CU8,61
|
7
|
+
mostlyai_mock-0.1.16.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
8
|
+
mostlyai_mock-0.1.16.dist-info/RECORD,,
|
@@ -1,8 +0,0 @@
|
|
1
|
-
mostlyai/mock/__init__.py,sha256=uv2DLnOleN6BNMfAMleXJCPcOZvM_tMTRy5njUIKDag,715
|
2
|
-
mostlyai/mock/core.py,sha256=JDJ9nVpRR2WochxumSdQS96zak0OV1frkJOwlQsPVBw,61715
|
3
|
-
mostlyai/mock/mcp_server.py,sha256=0Vn1jmrdNAvUZSviaaU7Lhn7L7iHFyd8kGFigM0-4s0,2367
|
4
|
-
mostlyai_mock-0.1.15.dist-info/METADATA,sha256=OG3NRdCcH2qycRQ5HrzyLtJwtl74lRw5Py1JtqfB2YI,14305
|
5
|
-
mostlyai_mock-0.1.15.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
6
|
-
mostlyai_mock-0.1.15.dist-info/entry_points.txt,sha256=XDbppUIAaCWW0nresVep8zb71pkzZuFA16jCBHq8CU8,61
|
7
|
-
mostlyai_mock-0.1.15.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
8
|
-
mostlyai_mock-0.1.15.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|