Skip to content

Commit 8a200f7

Browse files
committed
Fix architecture as well as FunctionResponse class implementation to correctly define ID and name return types as string or null.
1 parent 85eea9c commit 8a200f7

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

docs/ARCHITECTURE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -687,8 +687,8 @@ direction LR
687687
688688
namespace AiClientNamespace.Tools.DTO {
689689
class FunctionCall {
690-
+getId() string
691-
+getName() string
690+
+getId() ?string
691+
+getName() ?string
692692
+getArgs() array< string, mixed >
693693
+getJsonSchema() array< string, mixed >$
694694
}
@@ -699,8 +699,8 @@ direction LR
699699
+getJsonSchema() array< string, mixed >$
700700
}
701701
class FunctionResponse {
702-
+getId() string
703-
+getName() string
702+
+getId() ?string
703+
+getName() ?string
704704
+getResponse() mixed
705705
+getJsonSchema() array< string, mixed >$
706706
}

src/Tools/DTO/FunctionCall.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function __construct(?string $id = null, ?string $name = null, array $arg
6565
*
6666
* @since n.e.x.t
6767
*
68-
* @return string|null The unique identifier.
68+
* @return string|null The function call ID.
6969
*/
7070
public function getId(): ?string
7171
{

src/Tools/DTO/FunctionResponse.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ public function __construct(string $id, string $name, $response)
5959
*
6060
* @since n.e.x.t
6161
*
62-
* @return string The function call ID.
62+
* @return string|null The function call ID.
6363
*/
64-
public function getId(): string
64+
public function getId(): ?string
6565
{
6666
return $this->id;
6767
}
@@ -71,9 +71,9 @@ public function getId(): string
7171
*
7272
* @since n.e.x.t
7373
*
74-
* @return string The function name.
74+
* @return string|null The function name.
7575
*/
76-
public function getName(): string
76+
public function getName(): ?string
7777
{
7878
return $this->name;
7979
}

0 commit comments

Comments
 (0)