|
182 | 182 | "source": [ |
183 | 183 | "# Wrap the OpenAI API call with the `guard` object\n", |
184 | 184 | "raw_llm_output, validated_output, *rest = guard(\n", |
185 | | - " openai.completions.create,\n", |
| 185 | + " openai.Completion.create,\n", |
186 | 186 | " prompt_params={\"doctors_notes\": doctors_notes},\n", |
187 | 187 | " engine=\"text-davinci-003\",\n", |
188 | 188 | " max_tokens=1024,\n", |
|
544 | 544 | "source": [ |
545 | 545 | "# Wrap the OpenAI API call with the `guard` object\n", |
546 | 546 | "fragment_generator = guard(\n", |
547 | | - " openai.completions.create,\n", |
| 547 | + " openai.Completion.create,\n", |
548 | 548 | " prompt_params={\"doctors_notes\": doctors_notes},\n", |
549 | 549 | " engine=\"text-davinci-003\",\n", |
550 | 550 | " max_tokens=1024,\n", |
|
880 | 880 | "source": [ |
881 | 881 | "# Wrap the OpenAI API call with the `guard` object\n", |
882 | 882 | "raw, validated, *rest = guard(\n", |
883 | | - " openai.completions.create,\n", |
| 883 | + " openai.Completion.create,\n", |
884 | 884 | " engine=\"text-davinci-003\",\n", |
885 | 885 | " max_tokens=50,\n", |
886 | 886 | " temperature=0.1,\n", |
|
942 | 942 | "source": [ |
943 | 943 | "# Wrap the OpenAI API call with the `guard` object\n", |
944 | 944 | "fragment_generator = guard(\n", |
945 | | - " openai.completions.create,\n", |
| 945 | + " openai.Completion.create,\n", |
946 | 946 | " engine=\"text-davinci-003\",\n", |
947 | 947 | " max_tokens=50,\n", |
948 | 948 | " temperature=0.1,\n", |
|
0 commit comments