ai-functions 0.1.1 → 0.1.2

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 (2) hide show
  1. package/package.json +3 -3
  2. package/proxy.js +3 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-functions",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Library for Developing and Managing AI Functions (including OpenAI GPT4 / GPT3.5)",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -20,10 +20,10 @@
20
20
  },
21
21
  "homepage": "https://github.com/nathanclevenger/ai-functions#readme",
22
22
  "devDependencies": {
23
+ "partial-json-parser": "^1.2.2",
23
24
  "vitest": "^0.33.0"
24
25
  },
25
26
  "dependencies": {
26
- "js-yaml": "^4.1.0",
27
- "partial-json-parser": "^1.2.2"
27
+ "yaml": "^2.3.3"
28
28
  }
29
29
  }
package/proxy.js CHANGED
@@ -1,6 +1,7 @@
1
1
  // import { OpenAI } from 'openai'
2
2
  // import camelcaseKeys from 'camelcase-keys'
3
- import { dump } from 'js-yaml'
3
+ // import { dump } from 'js-yaml'
4
+ import { stringify } from 'yaml'
4
5
  import { schema } from './schema.js'
5
6
 
6
7
  export const AI = opts => {
@@ -34,7 +35,7 @@ export const AI = opts => {
34
35
  const prompt = {
35
36
  model,
36
37
  messages: [
37
- { role: 'user', content: `Call ${functionName} given the context:\n${dump(args)}` }, // \nThere is no additional information, so make assumptions/guesses as necessary` },
38
+ { role: 'user', content: `Call ${functionName} given the context:\n${stringify(args)}` }, // \nThere is no additional information, so make assumptions/guesses as necessary` },
38
39
  ],
39
40
  functions: [{
40
41
  name: functionName,