UNPKG

graphdb-workbench

Version:
2 lines 16.1 kB
export const __webpack_id__=23283;export const __webpack_ids__=[23283,28319,70826];export const __webpack_modules__={23283:(t,e,s)=>{s.r(e),s.d(e,{AdditionalExtractionMethodFormModel:()=>h,AdditionalExtractionMethodsFormModel:()=>d,AgentFormModel:()=>n,AgentInstructionsFormModel:()=>l,ExtractionMethodFormModel:()=>a,ExtractionMethodsFormModel:()=>o});var i=s(38940),r=s(28319);class n{constructor(t){this._id=t&&t.id,this._name=t&&t.name,this._repositoryId=t&&t.repositoryId,this._model=t&&t.model||"gpt-4o",this._contextSize=t&&t.contextSize,this._contextSizeCopy=t&&t.contextSize,this._temperature=t&&t.temperature||new i.NumericRangeModel({value:.7,minValue:0,maxValue:2,step:.1}),this._topP=t&&t.topP||new i.NumericRangeModel({value:1,minValue:0,maxValue:1,step:.1}),this._seed=t&&t.seed,this._instructions=t&&t.instructions,this._assistantExtractionMethods=t&&t.assistantExtractionMethods||this.getDefaultExtractionMethods(),this._additionalExtractionMethods=t&&t.additionalExtractionMethods||this.getDefaultAdditionalExtractionMethod()}getDefaultExtractionMethods(){const t=[];return t.push(new a({method:r.ExtractionMethod.SPARQL,ontologyGraph:"http://example.com/swgraph",sparqlQuery:new i.TextFieldModel({value:"select ?s ?p ?o where {?s ?p ?o .}",minLength:1,maxLength:2380}),selected:!1})),t.push(new a({method:r.ExtractionMethod.FTS_SEARCH,maxNumberOfTriplesPerCall:null,selected:!1})),t.push(new a({method:r.ExtractionMethod.SIMILARITY,similarityIndex:null,similarityIndexThreshold:new i.NumericRangeModel({value:.6,minValue:0,maxValue:1,step:.1}),maxNumberOfTriplesPerCall:null,selected:!1,connectorType:null,connectorFields:[]})),t.push(new a({method:r.ExtractionMethod.RETRIEVAL,retrievalConnectorInstance:null,maxNumberOfTriplesPerCall:null,queryTemplate:new i.TextFieldModel({value:'{"query": "string"}',minLength:1,maxLength:2380}),selected:!1})),new o(t)}getDefaultAdditionalExtractionMethod(){const t=[];return t.push(new h({method:r.AdditionalExtractionMethod.IRI_DISCOVERY_SEARCH}),new h({method:r.AdditionalExtractionMethod.AUTOCOMPLETE_IRI_DISCOVERY_SEARCH,maxNumberOfResultsPerCall:0})),new d(t)}toPayload(){return{id:this.id,name:this._name,repositoryId:this._repositoryId,model:this._model,contextSize:this._contextSize,temperature:this._temperature.value,topP:this._topP.value,seed:this._seed,assistantsInstructions:this._instructions.toPayload(),assistantExtractionMethods:this._assistantExtractionMethods.toPayload(),additionalExtractionMethods:this._additionalExtractionMethods.toPayload()}}hasExtractionMethodSelected(){return this._assistantExtractionMethods.extractionMethods.some(t=>t.selected)}get id(){return this._id}set id(t){this._id=t}get name(){return this._name}set name(t){this._name=t}get repositoryId(){return this._repositoryId}set repositoryId(t){this._repositoryId=t}get model(){return this._model}set model(t){this._model=t}get contextSize(){return this._contextSize}set contextSize(t){this._contextSize=t}get contextSizeCopy(){return this._contextSizeCopy}set contextSizeCopy(t){this._contextSizeCopy=t}get temperature(){return this._temperature}set temperature(t){this._temperature=t}get topP(){return this._topP}set topP(t){this._topP=t}get seed(){return this._seed}set seed(t){this._seed=t}get instructions(){return this._instructions}set instructions(t){this._instructions=t}get assistantExtractionMethods(){return this._assistantExtractionMethods}set assistantExtractionMethods(t){this._assistantExtractionMethods=t}get additionalExtractionMethods(){return this._additionalExtractionMethods}set additionalExtractionMethods(t){this._additionalExtractionMethods=t}}class o{constructor(t){this._extractionMethods=t}toPayload(){return this._extractionMethods.filter(t=>t.selected).map(t=>t.toPayload())}findExtractionMethodIndex(t){return this._extractionMethods.findIndex(e=>e.method===t)}setExtractionMethod(t){const e=this.findExtractionMethodIndex(t.method);-1!==e&&(this._extractionMethods[e]=t)}get extractionMethods(){return this._extractionMethods}set extractionMethods(t){this._extractionMethods=t}getExtractionMethod(t){return this._extractionMethods.find(e=>e.method===t)}getSimilarityExtractionMethod(){return this.getExtractionMethod(r.ExtractionMethod.SIMILARITY)}getRetrievalExtractionMethod(){return this.getExtractionMethod(r.ExtractionMethod.RETRIEVAL)}getFTSSearchExtractionMethod(){return this.getExtractionMethod(r.ExtractionMethod.FTS_SEARCH)}}class a{constructor(t){this._selected=t.selected||!1,this._method=t.method,this._sparqlOption=t.sparqlOption,this._addMissingNamespaces=t.addMissingNamespaces,this._ontologyGraph=t.ontologyGraph,this._sparqlQuery=t.sparqlQuery,this._maxNumberOfTriplesPerCall=t.maxNumberOfTriplesPerCall,this._similarityIndex=t.similarityIndex,this._similarityIndexThreshold=t.similarityIndexThreshold,this._queryTemplate=t.queryTemplate,this._retrievalConnectorInstance=t.retrievalConnectorInstance,this._connectorType=t.connectorType,this._connectorFields=t.connectorFields||[],this._expanded=void 0!==t.expanded&&t.expanded}toggleCollapse(){this._expanded=!this._expanded}toPayload(){const t={};let e;if(t.method=this._method?this._method:null,"ontologyGraph"===this._sparqlOption?t.ontologyGraph=this._ontologyGraph?this._ontologyGraph:null:"sparqlQuery"===this._sparqlOption&&(t.sparqlQuery=this._sparqlQuery?this._sparqlQuery.value:null),this._method===r.ExtractionMethod.SPARQL&&void 0!==this._addMissingNamespaces&&(t.addMissingNamespaces=this._addMissingNamespaces),this._maxNumberOfTriplesPerCall&&(t.maxNumberOfTriplesPerCall=this._maxNumberOfTriplesPerCall),this._connectorType&&this._connectorType.includes(":")?e=this._connectorType:this._similarityIndex&&this._similarityIndex.includes(":")&&(e=this._similarityIndex),e){const{connector:s,index:i}=(t=>{if(!t||"string"!=typeof t)return{connector:null,index:null};const e=t.indexOf(":");return-1===e?{connector:null,index:t.trim()}:{connector:t.slice(0,e).trim(),index:t.slice(e+1).trim()}})(e);s&&(t.connectorType=s),i&&(t.similarityIndex=i)}else this._connectorType&&(t.connectorType=this._connectorType),this._similarityIndex&&(t.similarityIndex=this._similarityIndex);return this._similarityIndexThreshold&&this._similarityIndexThreshold.value&&(t.similarityIndexThreshold=parseFloat(this._similarityIndexThreshold.value)),this._method===r.ExtractionMethod.SIMILARITY&&this._connectorFields&&(t.connectorFields=this._connectorFields),this._queryTemplate&&this._queryTemplate.value&&(t.queryTemplate=this._queryTemplate.value),this._retrievalConnectorInstance&&(t.retrievalConnectorInstance=this._retrievalConnectorInstance),t}get selected(){return this._selected}set selected(t){this._selected=t}get method(){return this._method}set method(t){this._method=t}get sparqlOption(){return this._sparqlOption}set sparqlOption(t){this._sparqlOption=t}get sparqlQuery(){return this._sparqlQuery}set sparqlQuery(t){this._sparqlQuery=t}get addMissingNamespaces(){return this._addMissingNamespaces}set addMissingNamespaces(t){this._addMissingNamespaces=t}get ontologyGraph(){return this._ontologyGraph}set ontologyGraph(t){this._ontologyGraph=t}get maxNumberOfTriplesPerCall(){return this._maxNumberOfTriplesPerCall}set maxNumberOfTriplesPerCall(t){this._maxNumberOfTriplesPerCall=t}get similarityIndex(){return this._similarityIndex}set similarityIndex(t){this._similarityIndex=t}get similarityIndexThreshold(){return this._similarityIndexThreshold}set similarityIndexThreshold(t){this._similarityIndexThreshold=t}get queryTemplate(){return this._queryTemplate}set queryTemplate(t){this._queryTemplate=t}get retrievalConnectorInstance(){return this._retrievalConnectorInstance}set retrievalConnectorInstance(t){this._retrievalConnectorInstance=t}get connectorType(){return this._connectorType}set connectorType(t){this._connectorType=t}get connectorFields(){return this._connectorFields}set connectorFields(t){this._connectorFields=t}get expanded(){return this._expanded}set expanded(t){this._expanded=t}}class d{constructor(t){this._additionalExtractionMethods=t}toPayload(){return this._additionalExtractionMethods.filter(t=>t.selected).map(t=>t.toPayload())}findAdditionalExtractionMethod(t){return this._additionalExtractionMethods.find(e=>e.method===t)}setAdditionalExtractionMethod(t){Array.isArray(t)&&t.forEach(t=>{const e=this.findAdditionalExtractionMethod(t._method);e&&(e._selected=t._selected,e._maxNumberOfResultsPerCall=t._maxNumberOfResultsPerCall,e._expanded=t._expanded)})}get additionalExtractionMethods(){return this._additionalExtractionMethods}set additionalExtractionMethods(t){this._additionalExtractionMethods=t}}class h{constructor(t){this._selected=t.selected||!1,this._method=t.method,this._expanded=t.expanded||!1,this._maxNumberOfResultsPerCall=t.maxNumberOfResultsPerCall||null}toPayload(){const t={},e=this._method===r.AdditionalExtractionMethod.AUTOCOMPLETE_IRI_DISCOVERY_SEARCH;return t.method=this._method,e&&this._maxNumberOfResultsPerCall&&(t.limit=this._maxNumberOfResultsPerCall),t}get selected(){return this._selected}set selected(t){this._selected=t}get method(){return this._method}set method(t){this._method=t}get expanded(){return this._expanded}set expanded(t){this._expanded=t}toggleCollapse(){this._expanded=!this._expanded}get maxNumberOfResultsPerCall(){return this._maxNumberOfResultsPerCall}set maxNumberOfResultsPerCall(t){this._maxNumberOfResultsPerCall=t}}class l{constructor(t){this._systemInstruction=t.systemInstruction,this._systemInstructionCopy=t.defaultSystemInstruction,this._userInstruction=t.userInstruction,this._userInstructionCopy=t.defaultUserInstruction}toPayload(){return{systemInstruction:this._systemInstruction,userInstruction:this._userInstruction}}get systemInstruction(){return this._systemInstruction}set systemInstruction(t){this._systemInstruction=t}get systemInstructionCopy(){return this._systemInstructionCopy}set systemInstructionCopy(t){this._systemInstructionCopy=t}get userInstruction(){return this._userInstruction}set userInstruction(t){this._userInstruction=t}get userInstructionCopy(){return this._userInstructionCopy}set userInstructionCopy(t){this._userInstructionCopy=t}}},28319:(t,e,s)=>{s.r(e),s.d(e,{AdditionalExtractionMethod:()=>_,AdditionalExtractionMethodModel:()=>h,AdditionalExtractionMethodsModel:()=>d,AgentCompatibility:()=>m,AgentInstructionsModel:()=>o,AgentListFilterModel:()=>u,AgentListModel:()=>l,AgentModel:()=>n,ExtractionMethod:()=>c,ExtractionMethodModel:()=>a});var i=s(98980),r=s(70826);class n{constructor(t,e){this.hashGenerator=e,this._isDeleted=!1,this._id=t.id,this._name=t.name,this._repositoryId=t.repositoryId,this.isRepositoryDeleted=void 0!==t.isRepositoryDeleted&&t.isRepositoryDeleted,this._model=t.model,this._contextSize=t.contextSize,this._temperature=t.temperature,this._topP=t.topP,this._seed=t.seed,this._instructions=t.instructions,this._assistantExtractionMethods=t.assistantExtractionMethods,this._additionalExtractionMethods=t.additionalExtractionMethods,this._compatibility=t.compatibility||m.COMPATIBLE,this._isCompatible=this._compatibility===m.COMPATIBLE}get isDeleted(){return this._isDeleted}set isDeleted(t){this._isDeleted=t}get id(){return this._id}set id(t){this._id=t}get name(){return this._name}set name(t){this._name=t}get repositoryId(){return this._repositoryId}set repositoryId(t){this._repositoryId=t}get model(){return this._model}set model(t){this._model=t}get contextSize(){return this._contextSize}set contextSize(t){this._contextSize=t}get temperature(){return this._temperature}set temperature(t){this._temperature=t}get topP(){return this._topP}set topP(t){this._topP=t}get seed(){return this._seed}set seed(t){this._seed=t}get instructions(){return this._instructions}set instructions(t){this._instructions=t}get assistantExtractionMethods(){return this._assistantExtractionMethods}set assistantExtractionMethods(t){this._assistantExtractionMethods=t}get additionalExtractionMethods(){return this._additionalExtractionMethods}set additionalExtractionMethods(t){this._additionalExtractionMethods=t}get compatibility(){return this._compatibility}get isCompatible(){return this._isCompatible}}class o{constructor(t){this._systemInstruction=t.systemInstruction,this._userInstruction=t.userInstruction}get systemInstruction(){return this._systemInstruction}set systemInstruction(t){this._systemInstruction=t}get userInstruction(){return this._userInstruction}set userInstruction(t){this._userInstruction=t}}class a{constructor(t){this._method=t.method,this._addMissingNamespaces=t.addMissingNamespaces,this._ontologyGraph=t.ontologyGraph,this._sparqlQuery=t.sparqlQuery,this._maxNumberOfTriplesPerCall=t.maxNumberOfTriplesPerCall,this._similarityIndex=t.similarityIndex,this._similarityIndexThreshold=t.similarityIndexThreshold,this._queryTemplate=t.queryTemplate,this._retrievalConnectorInstance=t.retrievalConnectorInstance,this._connectorFields=t.connectorFields||[],this._connectorType=t.connectorType||null}get method(){return this._method}set method(t){this._method=t}get addMissingNamespaces(){return this._addMissingNamespaces}set addMissingNamespaces(t){this._addMissingNamespaces=t}get sparqlQuery(){return this._sparqlQuery}set sparqlQuery(t){this._sparqlQuery=t}get ontologyGraph(){return this._ontologyGraph}set ontologyGraph(t){this._ontologyGraph=t}get maxNumberOfTriplesPerCall(){return this._maxNumberOfTriplesPerCall}set maxNumberOfTriplesPerCall(t){this._maxNumberOfTriplesPerCall=t}get similarityIndex(){return this._similarityIndex}set similarityIndex(t){this._similarityIndex=t}get similarityIndexThreshold(){return this._similarityIndexThreshold}set similarityIndexThreshold(t){this._similarityIndexThreshold=t}get queryTemplate(){return this._queryTemplate}set queryTemplate(t){this._queryTemplate=t}get retrievalConnectorInstance(){return this._retrievalConnectorInstance}set retrievalConnectorInstance(t){this._retrievalConnectorInstance=t}get connectorFields(){return this._connectorFields}set connectorFields(t){this._connectorFields=t}get connectorType(){return this._connectorType}set connectorType(t){this._connectorType=t}}class d{constructor(t){this._additionalExtractionMethods=t}get additionalExtractionMethods(){return this._additionalExtractionMethods}set additionalExtractionMethods(t){this._additionalExtractionMethods=t}}class h{constructor(t){this._method=t.method,this._maxNumberOfResultsPerCall=t.maxNumberOfResultsPerCall}get method(){return this._method}set method(t){this._method=t}get maxNumberOfResultsPerCall(){return this._maxNumberOfResultsPerCall}set maxNumberOfResultsPerCall(t){this._maxNumberOfResultsPerCall=t}}class l{constructor(t=[]){this._agents=t,this._filterableAgents=(0,i.cloneDeep)(t),this._agentNameByIdMap={},this._initializeAgentNameByIdMap()}_initializeAgentNameByIdMap(){this._agentNameByIdMap=this._agents.reduce((t,e)=>(t[e.id]=e.name,t),{})}isEmpty(){return 0===this._agents.length}filterByRepository(t){this._filterableAgents=this._agents.filter(e=>t===r.AGENTS_FILTER_ALL_KEY||(e.repositoryId===t?e:void 0))}getAgent(t){return this._agents.find(e=>e.id===t)}get agents(){return this._agents}set agents(t){this._agents=t}get filterableAgents(){return this._filterableAgents}set filterableAgents(t){this._filterableAgents=t}get agentNameByIdMap(){return(0,i.cloneDeep)(this._agentNameByIdMap)}set agentNameByIdMap(t){this._agentNameByIdMap=t}}const c={FTS_SEARCH:"fts_search",SPARQL:"sparql_search",SIMILARITY:"similarity_search",RETRIEVAL:"retrieval_search"},_={IRI_DISCOVERY_SEARCH:"iri_discovery_search",AUTOCOMPLETE_IRI_DISCOVERY_SEARCH:"autocomplete_iri_discovery_search"};class u{constructor(t,e,s=!1){this._key=t,this._label=e,this._selected=s}get key(){return this._key}set key(t){this._key=t}get label(){return this._label}set label(t){this._label=t}get selected(){return this._selected}set selected(t){this._selected=t}}const m={COMPATIBLE:"COMPATIBLE",INCOMPATIBLE:"INCOMPATIBLE"}},70826:(t,e,s)=>{s.r(e),s.d(e,{AGENTS_FILTER_ALL_KEY:()=>r,AGENT_OPERATION:()=>n,TTYG_ERROR_MSG_LENGTH:()=>i});const i=100,r="ALL",n={CREATE:"create",EDIT:"edit",CLONE:"clone"}}}; //# sourceMappingURL=23283.ccc601ee61f87fcefbec.bundle.js.map