mirror of
https://github.com/geoffsee/open-gsio.git
synced 2025-09-08 22:56:46 +00:00
Refactor chat-stream-provider
to simplify tool structure. Optimize WeatherTool
implementation with enriched function schema.
This commit is contained in:

committed by
Geoff Seemueller

parent
06b6a68b9b
commit
858282929c
@@ -34,8 +34,23 @@ export const WeatherTool = {
|
||||
required: ['location'],
|
||||
additionalProperties: false,
|
||||
},
|
||||
function: async (params: { location: string }) => {
|
||||
console.log('[WeatherTool] Getting weather for:', params.location);
|
||||
return { temperature: '25°C' };
|
||||
function: {
|
||||
name: 'getCurrentTemperature',
|
||||
description: 'Get the current temperature for a specific location',
|
||||
parameters: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
location: {
|
||||
type: 'string',
|
||||
description: 'The city and state, e.g., San Francisco, CA',
|
||||
},
|
||||
unit: {
|
||||
type: 'string',
|
||||
enum: ['Celsius', 'Fahrenheit'],
|
||||
description: "The temperature unit to use. Infer this from the user's location.",
|
||||
},
|
||||
},
|
||||
required: ['location', 'unit'],
|
||||
},
|
||||
},
|
||||
};
|
||||
|
Reference in New Issue
Block a user