@anyway-sh/node-server-sdk 0.22.8

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.
Files changed (56) hide show
  1. package/README +35 -0
  2. package/dist/index.d.ts +1957 -0
  3. package/dist/index.js +4458 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/index.mjs +4382 -0
  6. package/dist/src/index.d.ts +10 -0
  7. package/dist/src/lib/associations/associations.d.ts +32 -0
  8. package/dist/src/lib/client/annotation/base-annotation.d.ts +20 -0
  9. package/dist/src/lib/client/annotation/user-feedback.d.ts +32 -0
  10. package/dist/src/lib/client/dataset/attachment-uploader.d.ts +50 -0
  11. package/dist/src/lib/client/dataset/attachment.d.ts +84 -0
  12. package/dist/src/lib/client/dataset/base-dataset.d.ts +10 -0
  13. package/dist/src/lib/client/dataset/column.d.ts +23 -0
  14. package/dist/src/lib/client/dataset/dataset.d.ts +43 -0
  15. package/dist/src/lib/client/dataset/datasets.d.ts +14 -0
  16. package/dist/src/lib/client/dataset/index.d.ts +8 -0
  17. package/dist/src/lib/client/dataset/row.d.ts +73 -0
  18. package/dist/src/lib/client/evaluator/evaluator.d.ts +28 -0
  19. package/dist/src/lib/client/evaluator/index.d.ts +2 -0
  20. package/dist/src/lib/client/experiment/experiment.d.ts +76 -0
  21. package/dist/src/lib/client/experiment/index.d.ts +2 -0
  22. package/dist/src/lib/client/traceloop-client.d.ts +40 -0
  23. package/dist/src/lib/configuration/index.d.ts +35 -0
  24. package/dist/src/lib/configuration/validation.d.ts +3 -0
  25. package/dist/src/lib/errors/index.d.ts +36 -0
  26. package/dist/src/lib/generated/evaluators/index.d.ts +5 -0
  27. package/dist/src/lib/generated/evaluators/mbt-evaluators.d.ts +386 -0
  28. package/dist/src/lib/generated/evaluators/registry.d.ts +12 -0
  29. package/dist/src/lib/generated/evaluators/types.d.ts +401 -0
  30. package/dist/src/lib/images/image-uploader.d.ts +15 -0
  31. package/dist/src/lib/images/index.d.ts +2 -0
  32. package/dist/src/lib/interfaces/annotations.interface.d.ts +35 -0
  33. package/dist/src/lib/interfaces/dataset.interface.d.ts +105 -0
  34. package/dist/src/lib/interfaces/evaluator.interface.d.ts +83 -0
  35. package/dist/src/lib/interfaces/experiment.interface.d.ts +117 -0
  36. package/dist/src/lib/interfaces/index.d.ts +8 -0
  37. package/dist/src/lib/interfaces/initialize-options.interface.d.ts +133 -0
  38. package/dist/src/lib/interfaces/prompts.interface.d.ts +53 -0
  39. package/dist/src/lib/interfaces/traceloop-client.interface.d.ts +7 -0
  40. package/dist/src/lib/node-server-sdk.d.ts +19 -0
  41. package/dist/src/lib/prompts/fetch.d.ts +3 -0
  42. package/dist/src/lib/prompts/index.d.ts +3 -0
  43. package/dist/src/lib/prompts/registry.d.ts +9 -0
  44. package/dist/src/lib/prompts/template.d.ts +3 -0
  45. package/dist/src/lib/tracing/ai-sdk-transformations.d.ts +5 -0
  46. package/dist/src/lib/tracing/association.d.ts +4 -0
  47. package/dist/src/lib/tracing/baggage-utils.d.ts +2 -0
  48. package/dist/src/lib/tracing/custom-metric.d.ts +14 -0
  49. package/dist/src/lib/tracing/decorators.d.ts +22 -0
  50. package/dist/src/lib/tracing/index.d.ts +14 -0
  51. package/dist/src/lib/tracing/manual.d.ts +60 -0
  52. package/dist/src/lib/tracing/sampler.d.ts +7 -0
  53. package/dist/src/lib/tracing/span-processor.d.ts +48 -0
  54. package/dist/src/lib/tracing/tracing.d.ts +10 -0
  55. package/dist/src/lib/utils/response-transformer.d.ts +19 -0
  56. package/package.json +127 -0
package/README ADDED
@@ -0,0 +1,35 @@
1
+ # Anyway SDK for Node.js
2
+
3
+ [![Apache License][license-image]][license-image]
4
+
5
+ Anyway Tracing JS is a set of extensions built on top of [OpenTelemetry](https://opentelemetry.io/) that gives you complete observability over your LLM application. Because it uses OpenTelemetry under the hood, it can be connected to your existing observability solutions - Datadog, Honeycomb, and others.
6
+
7
+ ## Getting Started
8
+
9
+ Install the SDK:
10
+
11
+ ```shell
12
+ npm install --save @anyway-sh/node-server-sdk
13
+ ```
14
+
15
+ Then, to start instrumenting your code, just add these 2 lines to your code:
16
+
17
+ ```js
18
+ import * as traceloop from "@anyway-sh/node-server-sdk";
19
+
20
+ traceloop.initialize();
21
+ ```
22
+
23
+ Make sure to `import` the SDK before importing any LLM module.
24
+
25
+ ## Useful links
26
+
27
+ - For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
28
+ - For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>
29
+
30
+ ## License
31
+
32
+ Apache 2.0 - See [LICENSE][license-url] for more information.
33
+
34
+ [license-url]: https://github.com/anyway-platform/anyway-tracing-js/blob/main/LICENSE
35
+ [license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat