Skip to content

Commit 9564780

Browse files
committed
fix!: Change modelId to id
1 parent 55f34fe commit 9564780

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

ldai/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def config(
125125
model = None
126126
if 'model' in variation:
127127
model = ModelConfig(
128-
id=variation['model']['modelId'],
128+
id=variation['model']['id'],
129129
parameters=variation['model'],
130130
)
131131

ldai/testing/test_model_config.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def td() -> TestData:
1313
td.flag('model-config')
1414
.variations(
1515
{
16-
'model': {'modelId': 'fakeModel', 'temperature': 0.5, 'maxTokens': 4096},
16+
'model': {'id': 'fakeModel', 'temperature': 0.5, 'maxTokens': 4096},
1717
'provider': {'id': 'fakeProvider'},
1818
'messages': [{'role': 'system', 'content': 'Hello, {{name}}!'}],
1919
'_ldMeta': {'enabled': True, 'versionKey': 'abcd'},
@@ -27,7 +27,7 @@ def td() -> TestData:
2727
td.flag('multiple-messages')
2828
.variations(
2929
{
30-
'model': {'modelId': 'fakeModel', 'temperature': 0.7, 'maxTokens': 8192},
30+
'model': {'id': 'fakeModel', 'temperature': 0.7, 'maxTokens': 8192},
3131
'messages': [
3232
{'role': 'system', 'content': 'Hello, {{name}}!'},
3333
{'role': 'user', 'content': 'The day is, {{day}}!'},
@@ -43,7 +43,7 @@ def td() -> TestData:
4343
td.flag('ctx-interpolation')
4444
.variations(
4545
{
46-
'model': {'modelId': 'fakeModel', 'extra-attribute': 'I can be anything I set my mind/type to'},
46+
'model': {'id': 'fakeModel', 'extra-attribute': 'I can be anything I set my mind/type to'},
4747
'messages': [{'role': 'system', 'content': 'Hello, {{ldctx.name}}!'}],
4848
'_ldMeta': {'enabled': True, 'versionKey': 'abcd'},
4949
}
@@ -55,7 +55,7 @@ def td() -> TestData:
5555
td.flag('off-config')
5656
.variations(
5757
{
58-
'model': {'modelId': 'fakeModel', 'temperature': 0.1},
58+
'model': {'id': 'fakeModel', 'temperature': 0.1},
5959
'messages': [{'role': 'system', 'content': 'Hello, {{name}}!'}],
6060
'_ldMeta': {'enabled': False, 'versionKey': 'abcd'},
6161
}

0 commit comments

Comments
 (0)