fixe
This commit is contained in:
parent
247c43c820
commit
75b9e196b9
|
@ -201,23 +201,23 @@ class ChatController extends BaseController
|
|||
|
||||
self::$tools = [
|
||||
[
|
||||
'type' => 'function',
|
||||
'function' => [
|
||||
'name' => 'get_current_weather',
|
||||
'description' => 'Get the current weather in a given location',
|
||||
'parameters' => [
|
||||
'type' => 'object',
|
||||
'properties' => [
|
||||
'location' => [
|
||||
'type' => 'string',
|
||||
'description' => 'The city and state, e.g. San Francisco, CA',
|
||||
"type" => "function",
|
||||
"function" => [
|
||||
"name" => "get_current_weather",
|
||||
"description" => "Get the current weather in a given location",
|
||||
"parameters" => [
|
||||
"type" => "object",
|
||||
"properties" => [
|
||||
"location" => [
|
||||
"type" => "string",
|
||||
"description" => "The city and state, e.g. San Francisco, CA",
|
||||
],
|
||||
'unit' => [
|
||||
'type' => 'string',
|
||||
'enum' => ['celsius', 'fahrenheit']
|
||||
"unit" => [
|
||||
"type" => "string",
|
||||
"enum" => ["celsius", "fahrenheit"]
|
||||
],
|
||||
],
|
||||
'required' => ['location'],
|
||||
"required" => ["location"],
|
||||
],
|
||||
],
|
||||
],
|
||||
|
@ -609,7 +609,7 @@ class ChatController extends BaseController
|
|||
$result = self::$client->chat()->create([
|
||||
'model' => config('chat.model'),
|
||||
'messages' => (array)self::$context_messages,
|
||||
'tools' => self::$tools,
|
||||
'tools' => (array)self::$tools,
|
||||
'user' => Helper::isCLI() ? "system" : Auth::user()->username,
|
||||
]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue