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

Make it possible to set role to the next message after function calling #247

Merged
merged 2 commits into from
Oct 8, 2023

Conversation

uezo
Copy link
Owner

@uezo uezo commented Oct 8, 2023

Return FunctionResponse with body if you want to send JSON serialized response from API to ChatGPT.

return new FunctionResponse(serializedJson);

Return FunctionResponse with body and role="user" if you want send content as user message to ChatGPT.

var data = JsonConvert.DeserializeObject(serializedJson);

return new FunctionResponse(
    $"Reply based on the following information:\n\n- {data.key1}\n- {data.key2}}",
    "user"
);

- function (default): Set JSON serialized response from API
- user: Set content for user message based on the response from API
@uezo uezo changed the title Feature functionresponse role Make it possible to set role to the next message after function calling Oct 8, 2023
@uezo uezo merged commit 3ce0570 into master Oct 8, 2023
@uezo uezo deleted the feature-functionresponse-role branch October 8, 2023 00:34
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.

None yet

1 participant