rhua-chatgpt-web 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{api_chain-BhV6_Pmq.js → api_chain-BdfZ6btS.js} +2 -2
- package/dist/{api_chain-DVLnAgiW.cjs → api_chain-BeqsfaDz.cjs} +1 -1
- package/dist/{combine_docs_chain-B9QorZsY.js → combine_docs_chain-COuoBXN8.js} +2 -2
- package/dist/{combine_docs_chain-D8mHPBmd.cjs → combine_docs_chain-DUTKgXFP.cjs} +1 -1
- package/dist/{few_shot-CFSdacSl.js → few_shot-CXrHoFil.js} +1 -1
- package/dist/{few_shot-bRG5F-EG.cjs → few_shot-D5v-GZVm.cjs} +1 -1
- package/dist/{index-CR8ZslxC.js → index-5XRIGdCC.js} +1 -1
- package/dist/index-6S2tDoUS.js +4 -0
- package/dist/index-B2TrxU0U.js +4 -0
- package/dist/{index-DrzloHWR.cjs → index-B2xNSa5_.cjs} +1 -1
- package/dist/{index-9eExIDsS.cjs → index-B8iepdgY.cjs} +1 -1
- package/dist/{index-C0mX7ZGP.js → index-BB--QoGv.js} +679 -254
- package/dist/{index-B1Wlx-OU.cjs → index-BWUHG_4F.cjs} +1 -1
- package/dist/{index-BwGX7L-I.cjs → index-C-KTbjuY.cjs} +1 -1
- package/dist/{index-Dg40JuSw.cjs → index-C8v1v0ZB.cjs} +1 -1
- package/dist/{index-DmZ6JkXr.cjs → index-CSKkNkjZ.cjs} +9 -9
- package/dist/{index-Bz6sXppL.js → index-CZx4UvyD.js} +2 -2
- package/dist/index-Cbk2vr7P.js +4 -0
- package/dist/index-D0EbNeWR.js +4 -0
- package/dist/{index-szMPQlBb.js → index-D1-LRbik.js} +1 -1
- package/dist/{index-CM5Ei0Fe.js → index-D6OD8ywf.js} +2 -2
- package/dist/{index-BKYMy9rL.cjs → index-D6T6bzDk.cjs} +1 -1
- package/dist/{index-CiJIlOWe.cjs → index-DIvROZpA.cjs} +1 -1
- package/dist/{index-B4QG5JFW.js → index-DL9k9te9.js} +1 -1
- package/dist/{index-BxehhQJ1.js → index-DS6Ey1Z3.js} +1 -1
- package/dist/{index-Bm3Y9HAz.cjs → index-Dkt-39To.cjs} +1 -1
- package/dist/{index-B_Zc2AO-.js → index-DpM0G23h.js} +1 -1
- package/dist/{index-B9enJf5m.cjs → index-MSPGHs3d.cjs} +1 -1
- package/dist/{index-BUvzgpbD.cjs → index-iTyupZ7c.cjs} +1 -1
- package/dist/{index-BmJffSUR.cjs → index-ufFGYeSY.cjs} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/{index.es-lGV9_rDo.js → index.es-DD7ie9BT.js} +11 -11
- package/dist/{index.es-B2V8NsVE.cjs → index.es-DGO9vBB2.cjs} +2 -2
- package/dist/index.esm.js +1 -1
- package/dist/{llm_chain-1pCOifVt.js → llm_chain-BeI0W_p-.js} +1 -1
- package/dist/{llm_chain-D4IZ67iH.cjs → llm_chain-CCSE7ZH0.cjs} +1 -1
- package/dist/{sequential_chain-B9oXR3Bd.js → sequential_chain-DOfqDL23.js} +1 -1
- package/dist/{sequential_chain-DlVTyzea.cjs → sequential_chain-DPzxZkxm.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{vector_db_qa-BrELsB11.js → vector_db_qa-DQnKfZL6.js} +3 -3
- package/dist/{vector_db_qa-CYd9aCx5.cjs → vector_db_qa-DrnJyLCE.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-BDLTve4Z.js +0 -4
- package/dist/index-NaKA8k_1.js +0 -4
- package/dist/index-m3hI35_N.js +0 -4
- package/dist/index-x-JUDIDN.js +0 -4
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $, a0, a4, a2, a3, a1 } from "./index-
|
|
1
|
+
import { $, a0, a4, a2, a3, a1 } from "./index-BB--QoGv.js";
|
|
2
2
|
import "katex/dist/katex.min.css";
|
|
3
3
|
import "@semi-bot/semi-theme-xiangshuishidai/scss/index.scss";
|
|
4
4
|
import "@semi-bot/semi-theme-xiangshuishidai/scss/global.scss";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as BaseOutputParser, i as BaseChain, k as BasePromptTemplate, l as BaseLanguageModel, R as Runnable } from "./index-
|
|
1
|
+
import { j as BaseOutputParser, i as BaseChain, k as BasePromptTemplate, l as BaseLanguageModel, R as Runnable } from "./index-BB--QoGv.js";
|
|
2
2
|
import "zod";
|
|
3
3
|
class NoOpOutputParser extends BaseOutputParser {
|
|
4
4
|
constructor() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CSKkNkjZ.cjs");require("zod");class t extends e.BaseOutputParser{constructor(){super(...arguments),Object.defineProperty(this,"lc_namespace",{enumerable:!0,configurable:!0,writable:!0,value:["langchain","output_parsers","default"]}),Object.defineProperty(this,"lc_serializable",{enumerable:!0,configurable:!0,writable:!0,value:!0})}static lc_name(){return"NoOpOutputParser"}parse(e){return Promise.resolve(e)}getFormatInstructions(){return""}}function r(t){if(function(e){return"function"==typeof e._llmType}(t))return t;if("bound"in t&&e.Runnable.isRunnable(t.bound))return r(t.bound);if("runnable"in t&&"fallbacks"in t&&e.Runnable.isRunnable(t.runnable))return r(t.runnable);if("default"in t&&e.Runnable.isRunnable(t.default))return r(t.default);throw new Error("Unable to extract BaseLanguageModel from llmLike object.")}class i extends e.BaseChain{static lc_name(){return"LLMChain"}get inputKeys(){return this.prompt.inputVariables}get outputKeys(){return[this.outputKey]}constructor(e){if(super(e),Object.defineProperty(this,"lc_serializable",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"prompt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"llm",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"llmKwargs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"outputKey",{enumerable:!0,configurable:!0,writable:!0,value:"text"}),Object.defineProperty(this,"outputParser",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.prompt=e.prompt,this.llm=e.llm,this.llmKwargs=e.llmKwargs,this.outputKey=e.outputKey??this.outputKey,this.outputParser=e.outputParser??new t,this.prompt.outputParser){if(e.outputParser)throw new Error("Cannot set both outputParser and prompt.outputParser");this.outputParser=this.prompt.outputParser}}getCallKeys(){return"callKeys"in this.llm?this.llm.callKeys:[]}_selectMemoryInputs(e){const t=super._selectMemoryInputs(e),r=this.getCallKeys();for(const i of r)i in e&&delete t[i];return t}async _getFinalOutput(e,t,r){let i;return i=this.outputParser?await this.outputParser.parseResultWithPrompt(e,t,null==r?void 0:r.getChild()):e[0].text,i}call(e,t){return super.call(e,t)}async _call(e,t){const r={...e},i={...this.llmKwargs},l=this.getCallKeys();for(const s of l)s in e&&i&&(i[s]=e[s],delete r[s]);const a=await this.prompt.formatPromptValue(r);if("generatePrompt"in this.llm){const{generations:e}=await this.llm.generatePrompt([a],i,null==t?void 0:t.getChild());return{[this.outputKey]:await this._getFinalOutput(e[0],a,t)}}const n=this.outputParser?this.llm.pipe(this.outputParser):this.llm,u=await n.invoke(a,null==t?void 0:t.getChild());return{[this.outputKey]:u}}async predict(e,t){return(await this.call(e,t))[this.outputKey]}_chainType(){return"llm"}static async deserialize(t){const{llm:r,prompt:l}=t;if(!r)throw new Error("LLMChain must have llm");if(!l)throw new Error("LLMChain must have prompt");return new i({llm:await e.BaseLanguageModel.deserialize(r),prompt:await e.BasePromptTemplate.deserialize(l)})}serialize(){const e="serialize"in this.llm?this.llm.serialize():void 0;return{_type:`${this._chainType()}_chain`,llm:e,prompt:this.prompt.serialize()}}_getNumTokens(e){return r(this.llm).getNumTokens(e)}}exports.LLMChain=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CSKkNkjZ.cjs");function t(e,t){const i=new Set;for(const n of t)e.has(n)&&i.add(n);return i}function i(e,t){const i=new Set(e);for(const n of t)i.delete(n);return i}function n(e){return Array.from(e).map(e=>`"${e}"`).join(", ")}class a extends e.BaseChain{static lc_name(){return"SequentialChain"}get inputKeys(){return this.inputVariables}get outputKeys(){return this.outputVariables}constructor(e){if(super(e),Object.defineProperty(this,"chains",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"inputVariables",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"outputVariables",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"returnAll",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.chains=e.chains,this.inputVariables=e.inputVariables,this.outputVariables=e.outputVariables??[],this.outputVariables.length>0&&e.returnAll)throw new Error("Either specify variables to return using `outputVariables` or use `returnAll` param. Cannot apply both conditions at the same time.");this.returnAll=e.returnAll??!1,this._validateChains()}_validateChains(){var e;if(0===this.chains.length)throw new Error("Sequential chain must have at least one chain.");const a=(null==(e=this.memory)?void 0:e.memoryKeys)??[],r=new Set(this.inputKeys),s=new Set(a),o=t(r,s);if(o.size>0)throw new Error(`The following keys: ${n(o)} are overlapping between memory and input keys of the chain variables. This can lead to unexpected behaviour. Please use input and memory keys that don't overlap.`);const u=function(e,t){const i=new Set(e);for(const n of t)i.add(n);return i}(r,s);for(const l of this.chains){let e=i(new Set(l.inputKeys),u);if(l.memory&&(e=i(e,new Set(l.memory.memoryKeys))),e.size>0)throw new Error(`Missing variables for chain "${l._chainType()}": ${n(e)}. Only got the following variables: ${n(u)}.`);const a=new Set(l.outputKeys),r=t(u,a);if(r.size>0)throw new Error(`The following output variables for chain "${l._chainType()}" are overlapping: ${n(r)}. This can lead to unexpected behaviour.`);for(const t of a)u.add(t)}if(0===this.outputVariables.length)if(this.returnAll){const e=i(u,r);this.outputVariables=Array.from(e)}else this.outputVariables=this.chains[this.chains.length-1].outputKeys;else{const e=i(new Set(this.outputVariables),new Set(u));if(e.size>0)throw new Error(`The following output variables were expected to be in the final chain output but were not found: ${n(e)}.`)}}async _call(e,t){let i={};const n=e;let a=0;for(const s of this.chains){a+=1,i=await s.call(n,null==t?void 0:t.getChild(`step_${a}`));for(const e of Object.keys(i))n[e]=i[e]}const r={};for(const s of this.outputVariables)r[s]=n[s];return r}_chainType(){return"sequential_chain"}static async deserialize(t){const i=[],n=t.input_variables,r=t.output_variables,s=t.chains;for(const a of s){const t=await e.BaseChain.deserialize(a);i.push(t)}return new a({chains:i,inputVariables:n,outputVariables:r})}serialize(){const e=[];for(const t of this.chains)e.push(t.serialize());return{_type:this._chainType(),input_variables:this.inputVariables,output_variables:this.outputVariables,chains:e}}}class r extends e.BaseChain{static lc_name(){return"SimpleSequentialChain"}get inputKeys(){return[this.inputKey]}get outputKeys(){return[this.outputKey]}constructor(e){super(e),Object.defineProperty(this,"chains",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"inputKey",{enumerable:!0,configurable:!0,writable:!0,value:"input"}),Object.defineProperty(this,"outputKey",{enumerable:!0,configurable:!0,writable:!0,value:"output"}),Object.defineProperty(this,"trimOutputs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.chains=e.chains,this.trimOutputs=e.trimOutputs??!1,this._validateChains()}_validateChains(){for(const e of this.chains){if(1!==e.inputKeys.filter(t=>{var i;return!(null==(i=e.memory)?void 0:i.memoryKeys.includes(t))}).length)throw new Error(`Chains used in SimpleSequentialChain should all have one input, got ${e.inputKeys.length} for ${e._chainType()}.`);if(1!==e.outputKeys.length)throw new Error(`Chains used in SimpleSequentialChain should all have one output, got ${e.outputKeys.length} for ${e._chainType()}.`)}}async _call(e,t){let i=e[this.inputKey],n=0;for(const a of this.chains)n+=1,i=(await a.call({[a.inputKeys[0]]:i,signal:e.signal},null==t?void 0:t.getChild(`step_${n}`)))[a.outputKeys[0]],this.trimOutputs&&(i=i.trim()),await(null==t?void 0:t.handleText(i));return{[this.outputKey]:i}}_chainType(){return"simple_sequential_chain"}static async deserialize(t){const i=[],n=t.chains;for(const a of n){const t=await e.BaseChain.deserialize(a);i.push(t)}return new r({chains:i})}serialize(){const e=[];for(const t of this.chains)e.push(t.serialize());return{_type:this._chainType(),chains:e}}}exports.SequentialChain=a,exports.SimpleSequentialChain=r;
|