-
-
Notifications
You must be signed in to change notification settings - Fork 333
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
Functions Calling capability from ChatGPT model gpt-3.5-turbo-0613 not working #280
Comments
My guess: |
How would you update this code in order for this to work? |
I added a function calling example to the README: #281 |
I merged that example so it's in the main README now @kris2150. Can you try that example and let us know if it's working for you? |
# ChatGPT Functionsbegin message = @aiResponse.dig("choices", 0, "message") |
Describe the bug
This function throws a 500 error
**ArgumentError (unknown keyword: :functions):
app/controllers/openai_controller.rb:120:in `generate_insight'**
Am i doing something wrong
To Reproduce
Steps to reproduce the behavior:
# ChatGPT Prompt
begin
@aiResponseSleep = ChatGPTclient.completions(
model: "gpt-3.5-turbo-0613",
messages: [
{
role: "user",
content:"Your role is to be a Data Analyst with expert knowledge on sleep"
},
{
role: "user",
content:"
Your goal is to
- Provide a natural language comparison between these two data sets attached below make it short and interesting.
- Provide a comparison of the summariest from Today's day and past 3 Day
- Use days instead of full dates and bold these days
- Provide insights based on notes and based on your trained knowlege.
- Use an encouraging tone to make sure I keep up these habits
- Use HTML formatting and mark up to bold dates, number of days, REM, Deep, Light, Total
- Avoid displaying the data tables
"
},
{
role: "user",
content: "Today's Data: #{ formatted_latest_sleep_record.to_json }"
},
{
role: "user",
content: "Past 3 Days Sleep Recorded Data: #{ formatted_3days_data.to_json }"
}
]
)
rescue OpenaiChatgpt::Error => e
puts e.message
end
The text was updated successfully, but these errors were encountered: