Skip to content

Commit 4b9df4c

Browse files
committed
Add tests.
1 parent 15b92fe commit 4b9df4c

File tree

2 files changed

+712
-6
lines changed

2 files changed

+712
-6
lines changed

edb/schema/indexes.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,6 +1142,40 @@ def _try_load_reference_descs(
11421142
# Ignore failures
11431143
pass
11441144

1145+
if context.testmode:
1146+
embedding_model_descs['with-builtin-provider'] = EmbeddingModelDesc(
1147+
model_name='with-builtin-provider',
1148+
model_provider='ollama',
1149+
max_input_tokens=101,
1150+
max_batch_tokens=501,
1151+
max_output_dimensions=11,
1152+
supports_shortening=True,
1153+
)
1154+
embedding_model_descs['with-custom-provider'] = EmbeddingModelDesc(
1155+
model_name='with-custom-provider',
1156+
model_provider='test',
1157+
max_input_tokens=102,
1158+
max_batch_tokens=502,
1159+
max_output_dimensions=12,
1160+
supports_shortening=False,
1161+
)
1162+
embedding_model_descs['my-model-1'] = EmbeddingModelDesc(
1163+
model_name='my-model-1',
1164+
model_provider='ollama',
1165+
max_input_tokens=103,
1166+
max_batch_tokens=503,
1167+
max_output_dimensions=13,
1168+
supports_shortening=False,
1169+
)
1170+
embedding_model_descs['my-model-2'] = EmbeddingModelDesc(
1171+
model_name='my-model-2',
1172+
model_provider='ollama',
1173+
max_input_tokens=104,
1174+
max_batch_tokens=504,
1175+
max_output_dimensions=14,
1176+
supports_shortening=False,
1177+
)
1178+
11451179
return (provider_descs, embedding_model_descs)
11461180

11471181

0 commit comments

Comments
 (0)