@spendgraph/prompt 0.10.0 → 0.11.1

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.
@@ -43,6 +43,7 @@ export interface Chain {
43
43
  * four hundred and ninety-nine still land, and they have already been paid
44
44
  * for by the time one of them fails. Each carries the `rolloutId` its record
45
45
  * was written under, so a failure is traceable to a row rather than to a job.
46
+ * A `rolloutId` given here names the batch: row `i` is reported as `${rolloutId}:${i}`.
46
47
  */
47
48
  batch(values: Record<string, unknown>[], opts?: BatchOptions): Promise<Answer[]>;
48
49
  }
@@ -1 +1 @@
1
- import{mapLimit as i}from"../run/concurrency.js";import{newRolloutId as m}from"../run/id.js";const d=4;function w(c,n){const e=(r,t,o)=>c.call(r,({messages:l,turn:s})=>{const a={tools:s,onText:t.onText};return o&&n.stream?n.stream(l,a):n.call(l,a)},t),u=async(r,t)=>{try{return await e(r,t,!1)}catch(o){return{rolloutId:t.rolloutId,output:"",model:"unknown",status:"failed",error:o instanceof Error?o.message:String(o)}}};return{invoke:(r={},t={})=>e(r,t,!1),stream:(r={},t={})=>e(r,t,!0),batch:(r,t={})=>i(r,t.concurrency??d,o=>u(o,{...t,rolloutId:t.rolloutId??m()}))}}export{w as bind};
1
+ import{mapLimit as d}from"../run/concurrency.js";import{newRolloutId as s}from"../run/id.js";const m=4;function w(a,e){const l=(r,t,o)=>a.call(r,({messages:n,turn:i})=>{const u={tools:i,onText:t.onText};return o&&e.stream?e.stream(n,u):e.call(n,u)},t),c=async(r,t)=>{try{return await l(r,t,!1)}catch(o){return{rolloutId:t.rolloutId,output:"",model:"unknown",status:"failed",error:o instanceof Error?o.message:String(o)}}};return{invoke:(r={},t={})=>l(r,t,!1),stream:(r={},t={})=>l(r,t,!0),batch:(r,t={})=>d(r,t.concurrency??m,(o,n)=>c(o,{...t,rolloutId:t.rolloutId===void 0?s():`${t.rolloutId}:${n}`}))}}export{w as bind};
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  /** The version this package was published as; a test holds it to `package.json`. */
2
- export declare const PROMPT_VERSION = "0.10.0";
2
+ export declare const PROMPT_VERSION = "0.11.1";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- const o="0.10.0";export{o as PROMPT_VERSION};
1
+ const o="0.11.1";export{o as PROMPT_VERSION};
package/package.json CHANGED
@@ -1,17 +1,10 @@
1
1
  {
2
2
  "name": "@spendgraph/prompt",
3
- "version": "0.10.0",
3
+ "version": "0.11.1",
4
4
  "description": "Pull a stored prompt or build one in code, render it, and record what it cost.",
5
5
  "license": "Apache-2.0",
6
- "repository": {
7
- "type": "git",
8
- "url": "git+https://github.com/fnLog0/spendgraph.git",
9
- "directory": "packages/prompt"
10
- },
11
- "homepage": "https://github.com/fnLog0/spendgraph#readme",
12
- "bugs": {
13
- "url": "https://github.com/fnLog0/spendgraph/issues"
14
- },
6
+ "author": "Nasim Akhtar <fnlog10@gmail.com> (https://github.com/fnlog0)",
7
+ "homepage": "https://docs.locusgraph.com/spendgraph/prompt/overview",
15
8
  "keywords": [
16
9
  "llm",
17
10
  "prompt",
@@ -42,12 +35,12 @@
42
35
  "README.md"
43
36
  ],
44
37
  "dependencies": {
45
- "@spendgraph/sdk": "^0.10.0"
38
+ "@spendgraph/sdk": "^0.11.1"
46
39
  },
47
40
  "devDependencies": {
48
- "@spendgraph/config": "0.10.0",
49
- "@spendgraph/llms": "^0.10.0",
50
- "@spendgraph/tools": "^0.10.0",
41
+ "@spendgraph/config": "0.11.1",
42
+ "@spendgraph/llms": "^0.11.1",
43
+ "@spendgraph/tools": "^0.11.1",
51
44
  "typescript": "^5"
52
45
  },
53
46
  "engines": {