@layer-ai/core 0.1.6 → 0.1.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"anthropic.d.ts","sourceRoot":"","sources":["../../../src/services/providers/anthropic.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAkB,MAAM,eAAe,CAAC;AAe7D,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAgDnG"}
1
+ {"version":3,"file":"anthropic.d.ts","sourceRoot":"","sources":["../../../src/services/providers/anthropic.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAkB,MAAM,eAAe,CAAC;AAe7D,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAkDnG"}
@@ -26,13 +26,15 @@ export async function createCompletion(params) {
26
26
  content: msg.content,
27
27
  }));
28
28
  // Call anthropic api
29
+ // Note: Anthropic doesn't allow both temperature and top_p
30
+ // If both are set, prioritize temperature
29
31
  const response = await getAnthropicClient().messages.create({
30
32
  model: params.model,
31
33
  max_tokens: params.maxTokens || 1024,
32
34
  messages: anthropicMessages,
33
35
  ...(systemPrompt && { system: systemPrompt }),
34
36
  ...(params.temperature != null && { temperature: params.temperature }),
35
- ...(params.topP != null && { top_p: params.topP }),
37
+ ...(params.topP != null && params.temperature == null && { top_p: params.topP }),
36
38
  });
37
39
  // Extract response content
38
40
  const content = response.content[0].type === 'text'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@layer-ai/core",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Core API routes and services for Layer AI",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -33,7 +33,7 @@
33
33
  "dependencies": {
34
34
  "@anthropic-ai/sdk": "^0.39.0",
35
35
  "@google/genai": "^1.30.0",
36
- "@layer-ai/sdk": "^0.1.4",
36
+ "@layer-ai/sdk": "workspace:*",
37
37
  "bcryptjs": "^2.4.3",
38
38
  "express": "^4.18.2",
39
39
  "ioredis": "^5.3.2",