Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

複数のFunction callingに対応出来る形に変更 #94

Merged
merged 9 commits into from
Jan 31, 2024

Conversation

keitakn
Copy link
Member

@keitakn keitakn commented Jan 30, 2024

issueURL

#91

この PR で対応する範囲 / この PR で対応しない範囲

Function callingの複数呼び出しに対応出来るように改修を実施する

Storybook の URL、 スクリーンショット

なし

変更点概要

Function callingの複数呼び出しに対応出来るように tools を利用するように変更した。

Function callingに現在時刻を返す関数を追加して問題なく動作する事を確認済。

複数箇所の天気も回答可能になっている。

レビュアーに重点的にチェックして欲しい点

特になし

補足情報

Functionの実行は順次実行なので呼び出し回数が多いとパフォーマンスに問題が出てくる可能性があるので、これは別のPRで対応する。

@keitakn keitakn self-assigned this Jan 30, 2024
src/infrastructure/repository/openai/openai_cat_message_repository.py:104: error: Item "None" of "list[ChatCompletionMessageToolCall] | None" has no attribute "__iter__" (not iterable)  [union-attr]
src/infrastructure/repository/openai/openai_cat_message_repository.py:123: error: Incompatible return value type (got "list[dict[str, str | Any] | ChatCompletionMessage | ChatCompletionSystemMessageParam | ChatCompletionUserMessageParam | ChatCompletionAssistantMessageParam | ChatCompletionToolMessageParam | ChatCompletionFunctionMessageParam]", expected "list[ChatCompletionSystemMessageParam | ChatCompletionUserMessageParam | ChatCompletionAssistantMessageParam | ChatCompletionToolMessageParam | ChatCompletionFunctionMessageParam]")  [return-value]
src/infrastructure/repository/openai/openai_cat_message_repository.py:128: error: Function is missing a return type annotation  [no-untyped-def]
Found 3 errors in 1 file (checked 33 source files)
@keitakn keitakn marked this pull request as ready for review January 31, 2024 09:14
@keitakn keitakn merged commit 4a70326 into main Jan 31, 2024
1 check passed
@keitakn keitakn deleted the feature/issue91/update-multiple-function-calling branch January 31, 2024 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant