Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

axiom-ai

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

axiom-ai - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

dist/openai.d.ts

5

openai.ts

@@ -12,3 +12,3 @@ import { OpenAIApi, CreateCompletionRequest, CreateChatCompletionRequest } from "openai";

export default function withAxiom(openai: OpenAIApi, opts?: WithAxiomOptions): OpenAIApi {
export function withAxiom(openai: OpenAIApi, opts?: WithAxiomOptions): OpenAIApi {
const axiom = new Client({ token: opts?.token });

@@ -18,3 +18,3 @@ const dataset = opts?.dataset || process.env.AXIOM_DATASET;

const createCompletion = openai.createCompletion;
openai.createCompletion = async (request: CreateCompletionRequest, options?: AxiosRequestConfig) => {
openai.createCompletion = async (request: CreateCompletionRequest, options?: AxiosRequestConfig<any>) => {
const start = new Date();

@@ -104,2 +104,1 @@

}

11

package.json
{
"name": "axiom-ai",
"version": "1.0.0",
"version": "1.0.1",
"description": "The official package to send events from AI libraries to Axiom.",
"scripts": {
"build": "tsc",
"prepare": "npm run build",
"test": "echo \"Error: no test specified\" && exit 0"

@@ -37,3 +38,9 @@ },

"@axiomhq/axiom-node": "^0.11.0"
},
"exports": {
"./openai": {
"require": "./dist/openai.js",
"import": "./dist/openai.js"
}
}
}
}

@@ -1,3 +0,6 @@

![axiom-ai: The official package to send events from AI libraries to Axiom](.github/images/banner-dark.svg#gh-dark-mode-only)
![axiom-ai: The official package to send events from AI libraries to Axiom](.github/images/banner-light.svg#gh-light-mode-only)
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/163243/229035544-e4f5a8b2-eb65-4ef0-a17f-393072dc84c5.svg">
<source media="(prefers-color-scheme: light)" srcset="https://user-images.githubusercontent.com/163243/229035583-e97a467c-6f80-4826-8424-2337bd0f66b7.svg">
<img alt="axiom-ai: The official package to send events from AI libraries to Axiom" src="https://user-images.githubusercontent.com/163243/229035583-e97a467c-6f80-4826-8424-2337bd0f66b7.svg">
</picture>

@@ -27,3 +30,3 @@ [Axiom](https://axiom.co) unlocks observability at any scale.

import { Configuration, OpenAIApi } from "openai";
import withAxiom from "axiom-ai/openai";
import { withAxiom } from "axiom-ai/openai";

@@ -30,0 +33,0 @@ (async function() {

@@ -30,3 +30,3 @@ {

// "rootDir": "./", /* Specify the root folder within your source files. */
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
"moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */

@@ -53,3 +53,3 @@ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */

/* Emit */
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
// "declarationMap": true, /* Create sourcemaps for d.ts files. */

@@ -112,5 +112,9 @@ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */

},
"lib": ["es2015", "es2016"],
"include": [
"openai.ts"
]
],
"exclude": [
"node_modules",
],
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc