feat(coding): add model tools and device packages
This commit is contained in:
36
shared/model-tools.ts
Normal file
36
shared/model-tools.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
export type ModelWebSearchErrorCode =
|
||||
| 'model_web_search_unsupported'
|
||||
| 'model_context_changed'
|
||||
| 'model_web_search_rate_limited'
|
||||
| 'model_web_search_unavailable'
|
||||
| 'model_web_search_invalid_result';
|
||||
|
||||
export type ModelWebSearchSourceV1 = Readonly<{
|
||||
title: string;
|
||||
url: string;
|
||||
}>;
|
||||
|
||||
export type ModelWebSearchSuccessV1 = Readonly<{
|
||||
schema: 'makelore-model-tool.v1';
|
||||
tool: 'web_search';
|
||||
status: 'succeeded';
|
||||
modelId: string;
|
||||
answer: string;
|
||||
sources: ReadonlyArray<ModelWebSearchSourceV1>;
|
||||
sourceMode: 'structured' | 'inline-or-structured';
|
||||
}>;
|
||||
|
||||
export type ModelWebSearchFailureV1 = Readonly<{
|
||||
schema: 'makelore-model-tool.v1';
|
||||
tool: 'web_search';
|
||||
status: 'failed';
|
||||
modelId: string;
|
||||
error: Readonly<{
|
||||
code: ModelWebSearchErrorCode;
|
||||
message: string;
|
||||
httpStatus: 400 | 409 | 429 | 502 | 503;
|
||||
retryable: boolean;
|
||||
}>;
|
||||
}>;
|
||||
|
||||
export type ModelToolDetailsV1 = ModelWebSearchSuccessV1 | ModelWebSearchFailureV1;
|
||||
Reference in New Issue
Block a user