@polka-codes/core 0.9.79 → 0.9.81

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.
package/README.md CHANGED
@@ -30,7 +30,6 @@ import {
30
30
  createContext,
31
31
  makeStepFn,
32
32
  type ToolResponse,
33
- ToolResponseType,
34
33
  } from '@polka-codes/core';
35
34
  import { z } from 'zod';
36
35
 
@@ -52,10 +51,10 @@ async function main() {
52
51
  const { location } = input as z.infer<typeof getCurrentWeather.parameters>;
53
52
  // In a real app, you would call a weather API here
54
53
  const weather = `The weather in ${location} is 70°F and sunny.`;
55
- const response: ToolResponse = { type: ToolResponseType.Reply, message: weather };
54
+ const response: ToolResponse = { success: true, message: { type: 'text', value: weather } };
56
55
  return response;
57
56
  }
58
- const response: ToolResponse = { type: ToolResponseType.Error, message: 'Tool not found' };
57
+ const response: ToolResponse = { success: false, message: { type: 'error-text', value: 'Tool not found' } };
59
58
  return response;
60
59
  },
61
60
  // A simple text generation function