@dopt/ai-assistant-definition
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -1,2 +0,2 @@ | ||
"use strict";const typebox=require("@sinclair/typebox");typebox.Type.Object({type:typebox.Type.Union([typebox.Type.Literal("document"),typebox.Type.Literal("element"),typebox.Type.Literal("user"),typebox.Type.Literal("visual"),typebox.Type.Literal("semantic"),typebox.Type.Literal("runtime")])});const DocumentContext=typebox.Type.Object({type:typebox.Type.Literal("document"),value:typebox.Type.Object({hostname:typebox.Type.String(),path:typebox.Type.String(),title:typebox.Type.String(),width:typebox.Type.Number(),height:typebox.Type.Number()})}),ElementContext=typebox.Type.Object({type:typebox.Type.Literal("element"),value:typebox.Type.Object({position:typebox.Type.Object({top:typebox.Type.Number(),left:typebox.Type.Number()}),content:typebox.Type.String()})}),UserContext=typebox.Type.Object({type:typebox.Type.Literal("user"),value:typebox.Type.Object({})}),VisualContext=typebox.Type.Object({type:typebox.Type.Literal("visual"),value:typebox.Type.String()}),SemanticContext=typebox.Type.Object({type:typebox.Type.Literal("semantic"),value:typebox.Type.Object({semanticContent:typebox.Type.String(),neighboringSemanticContent:typebox.Type.String()})}),RuntimeContext=typebox.Type.Object({type:typebox.Type.Literal("runtime"),value:typebox.Type.Object({sid:typebox.Type.String(),context:typebox.Type.Union([typebox.Type.Number(),typebox.Type.Boolean(),typebox.Type.String()])})});var u=Object.defineProperty,o=Object.getOwnPropertySymbols,A=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,r=(p,e,t)=>e in p?u(p,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):p[e]=t,i=(p,e)=>{for(var t in e||(e={}))A.call(e,t)&&r(p,t,e[t]);if(o)for(var t of o(e))S.call(e,t)&&r(p,t,e[t]);return p};const UserIdentifierParams=typebox.Type.Object({userIdentifier:typebox.Type.String(),groupIdentifier:typebox.Type.Optional(typebox.Type.String())}),AssistantQueryParams=typebox.Type.Object(i({},UserIdentifierParams.properties)),AssistantRequestParams=typebox.Type.Object({sid:typebox.Type.String()}),AssistantCompletionsRequestBody=typebox.Type.Object({query:typebox.Type.Optional(typebox.Type.String()),context:typebox.Type.Optional(typebox.Type.Object({document:typebox.Type.Optional(typebox.Type.Union([DocumentContext,typebox.Type.Array(DocumentContext)])),visual:typebox.Type.Optional(typebox.Type.Union([VisualContext,typebox.Type.Array(VisualContext)])),element:typebox.Type.Optional(typebox.Type.Union([ElementContext,typebox.Type.Array(ElementContext)])),semantic:typebox.Type.Optional(typebox.Type.Union([SemanticContext,typebox.Type.Array(SemanticContext)])),runtime:typebox.Type.Optional(typebox.Type.Union([RuntimeContext,typebox.Type.Array(RuntimeContext)]))}))}),AssistantSearchRequestBody=AssistantCompletionsRequestBody,AssistantSearchResponse=typebox.Type.Array(typebox.Type.Object({documentId:typebox.Type.Number(),title:typebox.Type.String(),url:typebox.Type.String(),chunks:typebox.Type.Array(typebox.Type.Object({chunkId:typebox.Type.Number(),text:typebox.Type.String(),score:typebox.Type.Number()}))})),AssistantCompletionsResponse=typebox.Type.Object({documents:AssistantSearchResponse,answer:typebox.Type.String(),citations:typebox.Type.Array(typebox.Type.Object({id:typebox.Type.Number()}))}),StatusChunk=typebox.Type.Object({type:typebox.Type.Literal("status"),status:typebox.Type.Union([typebox.Type.Literal("searching"),typebox.Type.Literal("summarizing"),typebox.Type.Literal("answering"),typebox.Type.Literal("citing")])}),DocumentsChunk=typebox.Type.Object({type:typebox.Type.Literal("documents"),sources:typebox.Type.Array(typebox.Type.Object({url:typebox.Type.String(),title:typebox.Type.String(),id:typebox.Type.Number()}))}),ContentStreamChunk=typebox.Type.Object({type:typebox.Type.Literal("content"),content:typebox.Type.String()}),AnswerChunk=typebox.Type.Object({type:typebox.Type.Literal("answer"),answer:typebox.Type.String(),citations:typebox.Type.Array(typebox.Type.Object({id:typebox.Type.Number()}))}),ChatStreamChunk=typebox.Type.Union([StatusChunk,DocumentsChunk,ContentStreamChunk,AnswerChunk]);exports.AnswerChunk=AnswerChunk,exports.AssistantCompletionsRequestBody=AssistantCompletionsRequestBody,exports.AssistantCompletionsResponse=AssistantCompletionsResponse,exports.AssistantQueryParams=AssistantQueryParams,exports.AssistantRequestParams=AssistantRequestParams,exports.AssistantSearchRequestBody=AssistantSearchRequestBody,exports.AssistantSearchResponse=AssistantSearchResponse,exports.ChatStreamChunk=ChatStreamChunk,exports.ContentStreamChunk=ContentStreamChunk,exports.DocumentContext=DocumentContext,exports.DocumentsChunk=DocumentsChunk,exports.ElementContext=ElementContext,exports.RuntimeContext=RuntimeContext,exports.SemanticContext=SemanticContext,exports.StatusChunk=StatusChunk,exports.UserContext=UserContext,exports.UserIdentifierParams=UserIdentifierParams,exports.VisualContext=VisualContext; | ||
"use strict";const typebox=require("@sinclair/typebox");typebox.Type.Object({type:typebox.Type.Union([typebox.Type.Literal("document"),typebox.Type.Literal("element"),typebox.Type.Literal("visual"),typebox.Type.Literal("semantic")])});const DocumentContext=typebox.Type.Object({type:typebox.Type.Literal("document"),value:typebox.Type.Object({url:typebox.Type.String(),title:typebox.Type.String(),width:typebox.Type.Number(),height:typebox.Type.Number()})}),ElementContext=typebox.Type.Object({type:typebox.Type.Literal("element"),value:typebox.Type.Object({position:typebox.Type.Object({top:typebox.Type.Number(),left:typebox.Type.Number()}),content:typebox.Type.String(),tag:typebox.Type.String()})}),VisualContext=typebox.Type.Object({type:typebox.Type.Literal("visual"),value:typebox.Type.String()}),SemanticContext=typebox.Type.Object({type:typebox.Type.Literal("semantic"),value:typebox.Type.Object({semanticContent:typebox.Type.String(),neighboringSemanticContent:typebox.Type.String()})});var a=Object.defineProperty,n=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,r=(s,e,t)=>e in s?a(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,i=(s,e)=>{for(var t in e||(e={}))p.call(e,t)&&r(s,t,e[t]);if(n)for(var t of n(e))c.call(e,t)&&r(s,t,e[t]);return s};const UserIdentifierParams=typebox.Type.Object({userIdentifier:typebox.Type.String(),groupIdentifier:typebox.Type.Optional(typebox.Type.String())}),AssistantQueryParams=typebox.Type.Object(i({},UserIdentifierParams.properties)),AssistantRequestParams=typebox.Type.Object({sid:typebox.Type.String()}),AssistantCompletionsRequestBody=typebox.Type.Object({query:typebox.Type.Optional(typebox.Type.String()),context:typebox.Type.Optional(typebox.Type.Object({document:typebox.Type.Optional(DocumentContext),visual:typebox.Type.Optional(VisualContext),element:typebox.Type.Optional(ElementContext),semantic:typebox.Type.Optional(SemanticContext)}))}),AssistantSearchRequestBody=AssistantCompletionsRequestBody,AssistantSearchResponse=typebox.Type.Array(typebox.Type.Object({documentId:typebox.Type.Number(),title:typebox.Type.String(),url:typebox.Type.String(),chunks:typebox.Type.Array(typebox.Type.Object({chunkId:typebox.Type.Number(),text:typebox.Type.String(),score:typebox.Type.Number()}))})),AssistantCompletionsResponse=typebox.Type.Object({documents:AssistantSearchResponse,answer:typebox.Type.String(),citations:typebox.Type.Array(typebox.Type.Object({id:typebox.Type.Number()}))}),StatusChunk=typebox.Type.Object({type:typebox.Type.Literal("status"),status:typebox.Type.Union([typebox.Type.Literal("searching"),typebox.Type.Literal("summarizing"),typebox.Type.Literal("answering"),typebox.Type.Literal("citing")])}),DocumentsChunk=typebox.Type.Object({type:typebox.Type.Literal("documents"),sources:typebox.Type.Array(typebox.Type.Object({url:typebox.Type.String(),title:typebox.Type.String(),id:typebox.Type.Number()}))}),ContentStreamChunk=typebox.Type.Object({type:typebox.Type.Literal("content"),content:typebox.Type.String()}),AnswerChunk=typebox.Type.Object({type:typebox.Type.Literal("answer"),answer:typebox.Type.String(),citations:typebox.Type.Array(typebox.Type.Object({id:typebox.Type.Number()}))}),ChatStreamChunk=typebox.Type.Union([StatusChunk,DocumentsChunk,ContentStreamChunk,AnswerChunk]);exports.AnswerChunk=AnswerChunk,exports.AssistantCompletionsRequestBody=AssistantCompletionsRequestBody,exports.AssistantCompletionsResponse=AssistantCompletionsResponse,exports.AssistantQueryParams=AssistantQueryParams,exports.AssistantRequestParams=AssistantRequestParams,exports.AssistantSearchRequestBody=AssistantSearchRequestBody,exports.AssistantSearchResponse=AssistantSearchResponse,exports.ChatStreamChunk=ChatStreamChunk,exports.ContentStreamChunk=ContentStreamChunk,exports.DocumentContext=DocumentContext,exports.DocumentsChunk=DocumentsChunk,exports.ElementContext=ElementContext,exports.SemanticContext=SemanticContext,exports.StatusChunk=StatusChunk,exports.UserIdentifierParams=UserIdentifierParams,exports.VisualContext=VisualContext; | ||
//# sourceMappingURL=index.cjs.js.map |
@@ -21,7 +21,6 @@ import * as _sinclair_typebox from '@sinclair/typebox'; | ||
context: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{ | ||
document: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{ | ||
document: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{ | ||
type: _sinclair_typebox.TLiteral<"document">; | ||
value: _sinclair_typebox.TObject<{ | ||
hostname: _sinclair_typebox.TString<string>; | ||
path: _sinclair_typebox.TString<string>; | ||
url: _sinclair_typebox.TString<string>; | ||
title: _sinclair_typebox.TString<string>; | ||
@@ -31,20 +30,8 @@ width: _sinclair_typebox.TNumber; | ||
}>; | ||
}>, _sinclair_typebox.TArray<_sinclair_typebox.TObject<{ | ||
type: _sinclair_typebox.TLiteral<"document">; | ||
value: _sinclair_typebox.TObject<{ | ||
hostname: _sinclair_typebox.TString<string>; | ||
path: _sinclair_typebox.TString<string>; | ||
title: _sinclair_typebox.TString<string>; | ||
width: _sinclair_typebox.TNumber; | ||
height: _sinclair_typebox.TNumber; | ||
}>; | ||
}>>]>>; | ||
visual: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{ | ||
}>>; | ||
visual: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{ | ||
type: _sinclair_typebox.TLiteral<"visual">; | ||
value: _sinclair_typebox.TString<string>; | ||
}>, _sinclair_typebox.TArray<_sinclair_typebox.TObject<{ | ||
type: _sinclair_typebox.TLiteral<"visual">; | ||
value: _sinclair_typebox.TString<string>; | ||
}>>]>>; | ||
element: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{ | ||
}>>; | ||
element: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{ | ||
type: _sinclair_typebox.TLiteral<"element">; | ||
@@ -57,14 +44,6 @@ value: _sinclair_typebox.TObject<{ | ||
content: _sinclair_typebox.TString<string>; | ||
tag: _sinclair_typebox.TString<string>; | ||
}>; | ||
}>, _sinclair_typebox.TArray<_sinclair_typebox.TObject<{ | ||
type: _sinclair_typebox.TLiteral<"element">; | ||
value: _sinclair_typebox.TObject<{ | ||
position: _sinclair_typebox.TObject<{ | ||
top: _sinclair_typebox.TNumber; | ||
left: _sinclair_typebox.TNumber; | ||
}>; | ||
content: _sinclair_typebox.TString<string>; | ||
}>; | ||
}>>]>>; | ||
semantic: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{ | ||
}>>; | ||
semantic: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{ | ||
type: _sinclair_typebox.TLiteral<"semantic">; | ||
@@ -75,22 +54,3 @@ value: _sinclair_typebox.TObject<{ | ||
}>; | ||
}>, _sinclair_typebox.TArray<_sinclair_typebox.TObject<{ | ||
type: _sinclair_typebox.TLiteral<"semantic">; | ||
value: _sinclair_typebox.TObject<{ | ||
semanticContent: _sinclair_typebox.TString<string>; | ||
neighboringSemanticContent: _sinclair_typebox.TString<string>; | ||
}>; | ||
}>>]>>; | ||
runtime: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{ | ||
type: _sinclair_typebox.TLiteral<"runtime">; | ||
value: _sinclair_typebox.TObject<{ | ||
sid: _sinclair_typebox.TString<string>; | ||
context: _sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TBoolean, _sinclair_typebox.TString<string>]>; | ||
}>; | ||
}>, _sinclair_typebox.TArray<_sinclair_typebox.TObject<{ | ||
type: _sinclair_typebox.TLiteral<"runtime">; | ||
value: _sinclair_typebox.TObject<{ | ||
sid: _sinclair_typebox.TString<string>; | ||
context: _sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TBoolean, _sinclair_typebox.TString<string>]>; | ||
}>; | ||
}>>]>>; | ||
}>>; | ||
}>>; | ||
@@ -102,7 +62,6 @@ }>; | ||
context: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{ | ||
document: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{ | ||
document: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{ | ||
type: _sinclair_typebox.TLiteral<"document">; | ||
value: _sinclair_typebox.TObject<{ | ||
hostname: _sinclair_typebox.TString<string>; | ||
path: _sinclair_typebox.TString<string>; | ||
url: _sinclair_typebox.TString<string>; | ||
title: _sinclair_typebox.TString<string>; | ||
@@ -112,20 +71,8 @@ width: _sinclair_typebox.TNumber; | ||
}>; | ||
}>, _sinclair_typebox.TArray<_sinclair_typebox.TObject<{ | ||
type: _sinclair_typebox.TLiteral<"document">; | ||
value: _sinclair_typebox.TObject<{ | ||
hostname: _sinclair_typebox.TString<string>; | ||
path: _sinclair_typebox.TString<string>; | ||
title: _sinclair_typebox.TString<string>; | ||
width: _sinclair_typebox.TNumber; | ||
height: _sinclair_typebox.TNumber; | ||
}>; | ||
}>>]>>; | ||
visual: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{ | ||
}>>; | ||
visual: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{ | ||
type: _sinclair_typebox.TLiteral<"visual">; | ||
value: _sinclair_typebox.TString<string>; | ||
}>, _sinclair_typebox.TArray<_sinclair_typebox.TObject<{ | ||
type: _sinclair_typebox.TLiteral<"visual">; | ||
value: _sinclair_typebox.TString<string>; | ||
}>>]>>; | ||
element: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{ | ||
}>>; | ||
element: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{ | ||
type: _sinclair_typebox.TLiteral<"element">; | ||
@@ -138,14 +85,6 @@ value: _sinclair_typebox.TObject<{ | ||
content: _sinclair_typebox.TString<string>; | ||
tag: _sinclair_typebox.TString<string>; | ||
}>; | ||
}>, _sinclair_typebox.TArray<_sinclair_typebox.TObject<{ | ||
type: _sinclair_typebox.TLiteral<"element">; | ||
value: _sinclair_typebox.TObject<{ | ||
position: _sinclair_typebox.TObject<{ | ||
top: _sinclair_typebox.TNumber; | ||
left: _sinclair_typebox.TNumber; | ||
}>; | ||
content: _sinclair_typebox.TString<string>; | ||
}>; | ||
}>>]>>; | ||
semantic: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{ | ||
}>>; | ||
semantic: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{ | ||
type: _sinclair_typebox.TLiteral<"semantic">; | ||
@@ -156,22 +95,3 @@ value: _sinclair_typebox.TObject<{ | ||
}>; | ||
}>, _sinclair_typebox.TArray<_sinclair_typebox.TObject<{ | ||
type: _sinclair_typebox.TLiteral<"semantic">; | ||
value: _sinclair_typebox.TObject<{ | ||
semanticContent: _sinclair_typebox.TString<string>; | ||
neighboringSemanticContent: _sinclair_typebox.TString<string>; | ||
}>; | ||
}>>]>>; | ||
runtime: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{ | ||
type: _sinclair_typebox.TLiteral<"runtime">; | ||
value: _sinclair_typebox.TObject<{ | ||
sid: _sinclair_typebox.TString<string>; | ||
context: _sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TBoolean, _sinclair_typebox.TString<string>]>; | ||
}>; | ||
}>, _sinclair_typebox.TArray<_sinclair_typebox.TObject<{ | ||
type: _sinclair_typebox.TLiteral<"runtime">; | ||
value: _sinclair_typebox.TObject<{ | ||
sid: _sinclair_typebox.TString<string>; | ||
context: _sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TBoolean, _sinclair_typebox.TString<string>]>; | ||
}>; | ||
}>>]>>; | ||
}>>; | ||
}>>; | ||
@@ -259,3 +179,3 @@ }>; | ||
declare const Context: _sinclair_typebox.TObject<{ | ||
type: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"document">, _sinclair_typebox.TLiteral<"element">, _sinclair_typebox.TLiteral<"user">, _sinclair_typebox.TLiteral<"visual">, _sinclair_typebox.TLiteral<"semantic">, _sinclair_typebox.TLiteral<"runtime">]>; | ||
type: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"document">, _sinclair_typebox.TLiteral<"element">, _sinclair_typebox.TLiteral<"visual">, _sinclair_typebox.TLiteral<"semantic">]>; | ||
}>; | ||
@@ -266,4 +186,3 @@ type Context = Static<typeof Context>; | ||
value: _sinclair_typebox.TObject<{ | ||
hostname: _sinclair_typebox.TString<string>; | ||
path: _sinclair_typebox.TString<string>; | ||
url: _sinclair_typebox.TString<string>; | ||
title: _sinclair_typebox.TString<string>; | ||
@@ -283,10 +202,6 @@ width: _sinclair_typebox.TNumber; | ||
content: _sinclair_typebox.TString<string>; | ||
tag: _sinclair_typebox.TString<string>; | ||
}>; | ||
}>; | ||
type ElementContext = Static<typeof ElementContext>; | ||
declare const UserContext: _sinclair_typebox.TObject<{ | ||
type: _sinclair_typebox.TLiteral<"user">; | ||
value: _sinclair_typebox.TObject<{}>; | ||
}>; | ||
type UserContext = Static<typeof UserContext>; | ||
declare const VisualContext: _sinclair_typebox.TObject<{ | ||
@@ -305,11 +220,3 @@ type: _sinclair_typebox.TLiteral<"visual">; | ||
type SemanticContext = Static<typeof SemanticContext>; | ||
declare const RuntimeContext: _sinclair_typebox.TObject<{ | ||
type: _sinclair_typebox.TLiteral<"runtime">; | ||
value: _sinclair_typebox.TObject<{ | ||
sid: _sinclair_typebox.TString<string>; | ||
context: _sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TBoolean, _sinclair_typebox.TString<string>]>; | ||
}>; | ||
}>; | ||
type RuntimeContext = Static<typeof RuntimeContext>; | ||
export { AnswerChunk, AssistantCompletionsRequestBody, AssistantCompletionsResponse, AssistantQueryParams, AssistantRequestParams, AssistantSearchRequestBody, AssistantSearchResponse, ChatStreamChunk, ContentStreamChunk, Context, DocumentContext, DocumentsChunk, ElementContext, RuntimeContext, SemanticContext, StatusChunk, UserContext, UserIdentifierParams, VisualContext }; | ||
export { AnswerChunk, AssistantCompletionsRequestBody, AssistantCompletionsResponse, AssistantQueryParams, AssistantRequestParams, AssistantSearchRequestBody, AssistantSearchResponse, ChatStreamChunk, ContentStreamChunk, Context, DocumentContext, DocumentsChunk, ElementContext, SemanticContext, StatusChunk, UserIdentifierParams, VisualContext }; |
@@ -1,2 +0,2 @@ | ||
import{Type as t}from"@sinclair/typebox";t.Object({type:t.Union([t.Literal("document"),t.Literal("element"),t.Literal("user"),t.Literal("visual"),t.Literal("semantic"),t.Literal("runtime")])});const i=t.Object({type:t.Literal("document"),value:t.Object({hostname:t.String(),path:t.String(),title:t.String(),width:t.Number(),height:t.Number()})}),a=t.Object({type:t.Literal("element"),value:t.Object({position:t.Object({top:t.Number(),left:t.Number()}),content:t.String()})}),S=t.Object({type:t.Literal("user"),value:t.Object({})}),o=t.Object({type:t.Literal("visual"),value:t.String()}),s=t.Object({type:t.Literal("semantic"),value:t.Object({semanticContent:t.String(),neighboringSemanticContent:t.String()})}),c=t.Object({type:t.Literal("runtime"),value:t.Object({sid:t.String(),context:t.Union([t.Number(),t.Boolean(),t.String()])})});var d=Object.defineProperty,u=Object.getOwnPropertySymbols,L=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,l=(n,e,r)=>e in n?d(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,A=(n,e)=>{for(var r in e||(e={}))L.call(e,r)&&l(n,r,e[r]);if(u)for(var r of u(e))h.call(e,r)&&l(n,r,e[r]);return n};const b=t.Object({userIdentifier:t.String(),groupIdentifier:t.Optional(t.String())}),C=t.Object(A({},b.properties)),v=t.Object({sid:t.String()}),m=t.Object({query:t.Optional(t.String()),context:t.Optional(t.Object({document:t.Optional(t.Union([i,t.Array(i)])),visual:t.Optional(t.Union([o,t.Array(o)])),element:t.Optional(t.Union([a,t.Array(a)])),semantic:t.Optional(t.Union([s,t.Array(s)])),runtime:t.Optional(t.Union([c,t.Array(c)]))}))}),f=m,O=t.Array(t.Object({documentId:t.Number(),title:t.String(),url:t.String(),chunks:t.Array(t.Object({chunkId:t.Number(),text:t.String(),score:t.Number()}))})),N=t.Object({documents:O,answer:t.String(),citations:t.Array(t.Object({id:t.Number()}))}),p=t.Object({type:t.Literal("status"),status:t.Union([t.Literal("searching"),t.Literal("summarizing"),t.Literal("answering"),t.Literal("citing")])}),y=t.Object({type:t.Literal("documents"),sources:t.Array(t.Object({url:t.String(),title:t.String(),id:t.Number()}))}),j=t.Object({type:t.Literal("content"),content:t.String()}),g=t.Object({type:t.Literal("answer"),answer:t.String(),citations:t.Array(t.Object({id:t.Number()}))}),U=t.Union([p,y,j,g]);export{g as AnswerChunk,m as AssistantCompletionsRequestBody,N as AssistantCompletionsResponse,C as AssistantQueryParams,v as AssistantRequestParams,f as AssistantSearchRequestBody,O as AssistantSearchResponse,U as ChatStreamChunk,j as ContentStreamChunk,i as DocumentContext,y as DocumentsChunk,a as ElementContext,c as RuntimeContext,s as SemanticContext,p as StatusChunk,S as UserContext,b as UserIdentifierParams,o as VisualContext}; | ||
import{Type as t}from"@sinclair/typebox";t.Object({type:t.Union([t.Literal("document"),t.Literal("element"),t.Literal("visual"),t.Literal("semantic")])});const i=t.Object({type:t.Literal("document"),value:t.Object({url:t.String(),title:t.String(),width:t.Number(),height:t.Number()})}),a=t.Object({type:t.Literal("element"),value:t.Object({position:t.Object({top:t.Number(),left:t.Number()}),content:t.String(),tag:t.String()})}),s=t.Object({type:t.Literal("visual"),value:t.String()}),c=t.Object({type:t.Literal("semantic"),value:t.Object({semanticContent:t.String(),neighboringSemanticContent:t.String()})});var S=Object.defineProperty,o=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,l=(r,e,n)=>e in r?S(r,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[e]=n,h=(r,e)=>{for(var n in e||(e={}))y.call(e,n)&&l(r,n,e[n]);if(o)for(var n of o(e))d.call(e,n)&&l(r,n,e[n]);return r};const u=t.Object({userIdentifier:t.String(),groupIdentifier:t.Optional(t.String())}),L=t.Object(h({},u.properties)),C=t.Object({sid:t.String()}),b=t.Object({query:t.Optional(t.String()),context:t.Optional(t.Object({document:t.Optional(i),visual:t.Optional(s),element:t.Optional(a),semantic:t.Optional(c)}))}),v=b,m=t.Array(t.Object({documentId:t.Number(),title:t.String(),url:t.String(),chunks:t.Array(t.Object({chunkId:t.Number(),text:t.String(),score:t.Number()}))})),A=t.Object({documents:m,answer:t.String(),citations:t.Array(t.Object({id:t.Number()}))}),p=t.Object({type:t.Literal("status"),status:t.Union([t.Literal("searching"),t.Literal("summarizing"),t.Literal("answering"),t.Literal("citing")])}),O=t.Object({type:t.Literal("documents"),sources:t.Array(t.Object({url:t.String(),title:t.String(),id:t.Number()}))}),g=t.Object({type:t.Literal("content"),content:t.String()}),j=t.Object({type:t.Literal("answer"),answer:t.String(),citations:t.Array(t.Object({id:t.Number()}))}),f=t.Union([p,O,g,j]);export{j as AnswerChunk,b as AssistantCompletionsRequestBody,A as AssistantCompletionsResponse,L as AssistantQueryParams,C as AssistantRequestParams,v as AssistantSearchRequestBody,m as AssistantSearchResponse,f as ChatStreamChunk,g as ContentStreamChunk,i as DocumentContext,O as DocumentsChunk,a as ElementContext,c as SemanticContext,p as StatusChunk,u as UserIdentifierParams,s as VisualContext}; | ||
//# sourceMappingURL=index.esm.js.map |
{ | ||
"name": "@dopt/ai-assistant-definition", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "description": "An API definition/spec for the AI assistant", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54145
234