Skip to content

Commit 93aacec

Browse files
Merge pull request #236049 from mrbullwinkle/mrb_04_26_2023_github_issue_chat
[Azure OpenAI] update
2 parents 2ff2879 + 403bc18 commit 93aacec

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

articles/cognitive-services/openai/includes/chat-completion.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ response = openai.ChatCompletion.create(
3030
engine="gpt-35-turbo", # The deployment name you chose when you deployed the ChatGPT or GPT-4 model.
3131
messages=[
3232
{"role": "system", "content": "Assistant is a large language model trained by OpenAI."},
33-
{"role": "user", "content": "What's the difference between garbanzo beans and chickpeas?"}
33+
{"role": "user", "content": "Who were the founders of Microsoft?"}
3434
]
3535
)
3636

@@ -48,7 +48,7 @@ print(response['choices'][0]['message']['content'])
4848
"finish_reason": "stop",
4949
"index": 0,
5050
"message": {
51-
"content": "There is no difference between garbanzo beans and chickpeas \u2014 the terms are used interchangeably to describe the same round, beige-colored legume. Garbanzo beans are the Spanish name for the legume, while chickpeas are the English name for the same legume. They are a common ingredient in many traditional Middle Eastern and Mediterranean dishes, such as hummus, falafel, and stews.",
51+
"content": "The founders of Microsoft are Bill Gates and Paul Allen. They co-founded the company in 1975.",
5252
"role": "assistant"
5353
}
5454
}
@@ -64,7 +64,6 @@ print(response['choices'][0]['message']['content'])
6464
}
6565
}
6666
67-
There is no difference between garbanzo beans and chickpeas — the terms are used interchangeably to describe the same round, beige-colored legume. Garbanzo beans are the Spanish name for the legume, while chickpeas are the English name for the same legume. They are a common ingredient in many traditional Middle Eastern and Mediterranean dishes, such as hummus, falafel, and stews.
6867
```
6968

7069
> [!NOTE]
@@ -139,7 +138,7 @@ If you want the ChatGPT model to behave similarly to [chat.openai.com](https://c
139138

140139
```
141140
{"role": "system", "content": "Assistant is a large language model trained by OpenAI."},
142-
{"role": "user", "content": "What's the difference between garbanzo beans and chickpeas?"}
141+
{"role": "user", "content": "Who were the founders of Microsoft?"}
143142
```
144143

145144
#### Example with instructions

articles/cognitive-services/openai/includes/chat-markup-language.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ openai.api_key = os.getenv("OPENAI_API_KEY")
2828

2929
response = openai.Completion.create(
3030
engine="gpt-35-turbo", # The deployment name you chose when you deployed the ChatGPT model
31-
prompt="<|im_start|>system\nAssistant is a large language model trained by OpenAI.\n<|im_end|>\n<|im_start|>user\nWhat's the difference between garbanzo beans and chickpeas?\n<|im_end|>\n<|im_start|>assistant\n",
31+
prompt="<|im_start|>system\nAssistant is a large language model trained by OpenAI.\n<|im_end|>\n<|im_start|>user\nWho were the founders of Microsoft?\n<|im_end|>\n<|im_start|>assistant\n",
3232
temperature=0,
3333
max_tokens=500,
3434
top_p=0.5,
@@ -110,7 +110,7 @@ If you want the ChatGPT and GPT-4 models to behave similarly to [chat.openai.com
110110
Assistant is a large language model trained by OpenAI.
111111
<|im_end|>
112112
<|im_start|>user
113-
What's the difference between garbanzo beans and chickpeas?
113+
Who were the founders of Microsoft?
114114
<|im_end|>
115115
<|im_start|>assistant
116116
```

0 commit comments

Comments
 (0)