From 730ff5e1e95047544c22a81a70de2468dd8bf7a2 Mon Sep 17 00:00:00 2001 From: Jason Date: Fri, 30 Jun 2023 10:46:06 +0800 Subject: [PATCH] typo in example2 --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e3789b2..f308648 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,8 @@ print(result) # 9 import openai from openai_function_call import OpenAISchema +from pydantic import Field + class UserDetails(OpenAISchema): """User Details""" name: str = Field(..., description="User's name") @@ -93,7 +95,7 @@ class UserDetails(OpenAISchema): completion = openai.ChatCompletion.create( model="gpt-3.5-turbo-0613", - functions=[UserDetails.openai_schema] + functions=[UserDetails.openai_schema], messages=[ {"role": "system", "content": "I'm going to ask for user details. Use UserDetails to parse this data."}, {"role": "user", "content": "My name is John Doe and I'm 30 years old."},