diff options
Diffstat (limited to 'spec/logic/providers/openai/tools_spec.rb')
-rw-r--r-- | spec/logic/providers/openai/tools_spec.rb | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/spec/logic/providers/openai/tools_spec.rb b/spec/logic/providers/openai/tools_spec.rb index c92c374..1758e5f 100644 --- a/spec/logic/providers/openai/tools_spec.rb +++ b/spec/logic/providers/openai/tools_spec.rb @@ -13,14 +13,16 @@ RSpec.describe NanoBot::Logic::OpenAI::Tools do expect(described_class.adapt(cartridge[:tools][0])).to eq( { type: 'function', function: { - name: 'get-current-weather', - description: 'Get the current weather in a given location.', + name: 'what-time-is-it', + description: 'Returns the current date and time for a given timezone.', parameters: { type: 'object', properties: { - location: { type: 'string' }, - unit: { type: 'string' } - } + timezone: { + type: 'string', + description: 'A string representing the timezone that should be used to provide a datetime, following the IANA (Internet Assigned Numbers Authority) Time Zone Database. Examples are "Asia/Tokyo" and "Europe/Paris".' + } + }, required: ['timezone'] } } } ) @@ -28,9 +30,15 @@ RSpec.describe NanoBot::Logic::OpenAI::Tools do expect(described_class.adapt(cartridge[:tools][1])).to eq( { type: 'function', function: { - name: 'what-time-is-it', - description: 'Returns the current date and time.', - parameters: { properties: {}, type: 'object' } + name: 'get-current-weather', + description: 'Get the current weather in a given location.', + parameters: { + type: 'object', + properties: { + location: { type: 'string' }, + unit: { type: 'string' } + } + } } } ) |