|
35 | 35 | "outputs": [],
|
36 | 36 | "source": [
|
37 | 37 | "import semantic_kernel as sk\n",
|
38 |
| - "from semantic_kernel.connectors.ai.open_ai import AzureTextCompletion, OpenAITextCompletion" |
| 38 | + "from semantic_kernel.connectors.ai.open_ai import AzureChatCompletion, OpenAIChatCompletion" |
39 | 39 | ]
|
40 | 40 | },
|
41 | 41 | {
|
|
87 | 87 | "source": [
|
88 | 88 | "kernel = sk.Kernel()\n",
|
89 | 89 | "\n",
|
90 |
| - "kernel.add_text_completion_service( # We are adding a text service\n", |
| 90 | + "kernel.add_chat_service( # We are adding a text service\n", |
91 | 91 | " \"Azure_curie\", # The alias we can use in prompt templates' config.json\n",
|
92 |
| - " AzureTextCompletion(\n", |
| 92 | + " AzureChatCompletion(\n", |
93 | 93 | " \"my-finetuned-Curie\", # Azure OpenAI *Deployment name*\n",
|
94 | 94 | " \"https://contoso.openai.azure.com/\", # Azure OpenAI *Endpoint*\n",
|
95 | 95 | " \"...your Azure OpenAI Key...\" # Azure OpenAI *Key*\n",
|
96 | 96 | " )\n",
|
97 | 97 | ")\n",
|
98 | 98 | "\n",
|
99 |
| - "kernel.add_text_completion_service( # We are adding a text service\n", |
100 |
| - " \"OpenAI_davinci\", # The alias we can use in prompt templates' config.json\n", |
101 |
| - " OpenAITextCompletion(\n", |
102 |
| - " \"text-davinci-003\", # OpenAI Model Name\n", |
| 99 | + "kernel.add_chat_service( # We are adding a text service\n", |
| 100 | + " \"OpenAI_chat_gpt\", # The alias we can use in prompt templates' config.json\n", |
| 101 | + " OpenAIChatCompletion(\n", |
| 102 | + " \"gpt-3.5-turbo\", # OpenAI Model Name\n", |
103 | 103 | " \"...your OpenAI API Key...\", # OpenAI API key\n",
|
104 | 104 | " \"...your OpenAI Org ID...\" # *optional* OpenAI Organization ID\n",
|
105 | 105 | " )\n",
|
|
0 commit comments