Skip to content

Commit

Permalink
Create npm-publish.yml (#21)
Browse files Browse the repository at this point in the history
* Create npm-publish.yml

* remove evaluateEvent

* disallow port number in base url

* upgrade deps
  • Loading branch information
dinmukhamedm authored Oct 8, 2024
1 parent ad3c75f commit 83351ff
Show file tree
Hide file tree
Showing 5 changed files with 196 additions and 203 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js Package

on:
push:
branches: ["main"]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
13 changes: 2 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,9 @@ await observe({name: 'poemWriter'}, async () => await poemWriter('laminar flow')

### Sending events

You can send events in two ways:
- `.event(name, value)` – for a pre-defined event with one of possible values.
- `.evaluate_event(name, evaluator, data, env)` – for an event that is evaluated by evaluator pipeline based on the data.
You can send laminar events using `L.event(name, value)`.

Note that to run an evaluate event, you need to create an evaluator pipeline and create a target version for it.

Read our [docs](https://docs.lmnr.ai) to learn more about event types and how they are created and evaluated.
Read our [docs](https://docs.lmnr.ai) to learn more about events and examples.

### Example

Expand All @@ -86,11 +82,6 @@ const poem = response.choices[0].message.content;

// this will register True or False value with Laminar
L.event('topic alignment', poem.includes(topic))

// this will run the pipeline `checkWordy` with `poem` set as the value
// of `textInput` node, and write the result as an event with name
// "excessiveWordiness"
L.evaluateEvent('excessiveWordiness', 'checkWordy', {'textInput': 'poem'})
```

## Evaluations
Expand Down
68 changes: 34 additions & 34 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,41 +28,41 @@
},
"homepage": "https://github.com/lmnr-ai/lmnr-ts#README",
"devDependencies": {
"@anthropic-ai/sdk": ">=0.18.0",
"@aws-sdk/client-bedrock-runtime": ">=3.422.0",
"@azure/openai": ">=1.0.0-beta.7",
"@google-cloud/aiplatform": ">=2.17.0",
"@google-cloud/vertexai": ">=1.2.0",
"@langchain/core": ">=0.0.11",
"@pinecone-database/pinecone": ">=2.0.1",
"@qdrant/js-client-rest": ">=1.5.0",
"@types/argparse": ">=2.0.0",
"@types/cli-progress": ">=3.0.0",
"@types/node": ">=14.18.63",
"@types/semver": ">=7.5.3",
"@types/uuid": ">=9.0.6",
"bufferutil": ">=4.0.8",
"chromadb": ">=1.5.3",
"cohere-ai": ">=6.2.2",
"langchain": ">=0.0.56",
"llamaindex": ">=0.0.30",
"openai": ">=4.14.2",
"@anthropic-ai/sdk": "^0.27.3",
"@aws-sdk/client-bedrock-runtime": "^3.654.0",
"@azure/openai": "1.0.0-beta.13",
"@google-cloud/aiplatform": "^3.29.0",
"@google-cloud/vertexai": "^1.7.0",
"@langchain/core": "^0.3.2",
"@pinecone-database/pinecone": "^3.0.3",
"@qdrant/js-client-rest": "^1.11.0",
"@types/argparse": "^2.0.16",
"@types/cli-progress": "^3.11.6",
"@types/node": "^22.5.5",
"@types/semver": "^7.5.8",
"@types/uuid": "^10.0.0",
"bufferutil": "^4.0.8",
"chromadb": "^1.8.1",
"cohere-ai": "^7.13.1",
"langchain": "^0.3.2",
"llamaindex": "^0.6.2",
"openai": "^4.62.1",
"runnables": "link:@langchain/core/runnables",
"tsup": ">=7.2.0",
"typescript": ">=5.1.6",
"tsup": "^8.3.0",
"typescript": "^5.6.2",
"vectorstores": "link:@langchain/core/vectorstores"
},
"dependencies": {
"@grpc/grpc-js": ">=1.9.9",
"@opentelemetry/api": ">=1.9.0",
"@opentelemetry/core": ">=1.26.0",
"@opentelemetry/exporter-trace-otlp-grpc": ">=0.53.0",
"@opentelemetry/exporter-trace-otlp-proto": ">=0.53.0",
"@opentelemetry/instrumentation": ">=0.53.0",
"@opentelemetry/sdk-node": ">=0.53.0",
"@grpc/grpc-js": "^1.11.3",
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/core": "^1.26.0",
"@opentelemetry/exporter-trace-otlp-grpc": "^0.53.0",
"@opentelemetry/exporter-trace-otlp-proto": "^0.53.0",
"@opentelemetry/instrumentation": "^0.53.0",
"@opentelemetry/sdk-node": "^0.53.0",
"@opentelemetry/sdk-trace-base": "^1.26.0",
"@opentelemetry/sdk-trace-node": "^1.26.0",
"@opentelemetry/semantic-conventions": ">=1.27.0",
"@opentelemetry/semantic-conventions": "^1.27.0",
"@traceloop/ai-semantic-conventions": "^0.11.0",
"@traceloop/instrumentation-anthropic": "^0.11.1",
"@traceloop/instrumentation-azure": "^0.11.1",
Expand All @@ -75,10 +75,10 @@
"@traceloop/instrumentation-pinecone": "^0.11.1",
"@traceloop/instrumentation-qdrant": "^0.11.1",
"@traceloop/instrumentation-vertexai": "^0.11.1",
"argparse": ">=2.0.0",
"cli-progress": ">=3.0.0",
"esbuild": ">=0.19.5",
"posthog-node": ">=3.1.3",
"uuid": ">=9.0.0"
"argparse": ">=2.0",
"cli-progress": ">=3.12",
"esbuild": ">=0.23",
"posthog-node": ">=4.0",
"uuid": ">=10.0.0"
}
}
Loading

0 comments on commit 83351ff

Please sign in to comment.