You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-services/openai/concepts/content-filter.md
+23-23Lines changed: 23 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -316,6 +316,29 @@ When displaying code in your application, we strongly recommend that the applica
316
316
317
317
Annotations are currently available in the GA API version `2024-02-01` and in all preview versions starting from `2023-06-01-preview` for Completions and Chat Completions (GPT models). The following code snippet shows how to use annotations:
318
318
319
+
# [OpenAI Python 1.x](#tab/python-new)
320
+
321
+
```python
322
+
# os.getenv() for the endpoint and key assumes that you are using environment variables.
@@ -41,16 +41,16 @@ As this is a new version of the library with breaking changes, you should test y
41
41
42
42
To make the migration process easier, we're updating existing code examples in our docs for Python to a tabbed experience:
43
43
44
-
# [OpenAI Python 0.28.1](#tab/python)
44
+
# [OpenAI Python 1.x](#tab/python-new)
45
45
46
46
```console
47
-
pip install openai==0.28.1
47
+
pip install openai --upgrade
48
48
```
49
49
50
-
# [OpenAI Python 1.x](#tab/python-new)
50
+
# [OpenAI Python 0.28.1](#tab/python)
51
51
52
52
```console
53
-
pip install openai --upgrade
53
+
pip install openai==0.28.1
54
54
```
55
55
56
56
---
@@ -59,32 +59,6 @@ This provides context for what has changed and allows you to test the new librar
59
59
60
60
## Chat completions
61
61
62
-
# [OpenAI Python 0.28.1](#tab/python)
63
-
64
-
You need to set the `engine` variable to the deployment name you chose when you deployed the GPT-3.5-Turbo or GPT-4 models. Entering the model name will result in an error unless you chose a deployment name that is identical to the underlying model name.
You need to set the `model` variable to the deployment name you chose when you deployed the GPT-3.5-Turbo or GPT-4 models. Entering the model name results in an error unless you chose a deployment name that is identical to the underlying model name.
Additional examples can be found in our [in-depth Chat Completion article](chatgpt.md).
116
90
117
-
---
118
-
119
-
## Completions
120
-
121
91
# [OpenAI Python 0.28.1](#tab/python)
122
92
93
+
You need to set the `engine` variable to the deployment name you chose when you deployed the GPT-3.5-Turbo or GPT-4 models. Entering the model name will result in an error unless you chose a deployment name that is identical to the underlying model name.
Additional examples including how to handle semantic text search without `embeddings_utils.py` can be found in our [embeddings tutorial](../tutorials/embeddings.md).
For the full configuration steps that are required to make these code examples work, consult the [use your data quickstart](../use-your-data-quickstart.md).
Copy file name to clipboardExpand all lines: articles/ai-services/openai/includes/assistants-python.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ ms.date: 02/01/2024
18
18
- Access granted to Azure OpenAI in the desired Azure subscription
19
19
20
20
Currently, access to this service is granted only by application. You can apply for access to Azure OpenAI by completing the form at <ahref="https://aka.ms/oai/access"target="_blank">https://aka.ms/oai/access</a>. Open an issue on this repo to contact us if you have an issue.
21
-
- <ahref="https://www.python.org/"target="_blank">Python 3.7.1 or later version</a>
21
+
- <ahref="https://www.python.org/"target="_blank">Python 3.8 or later version</a>
22
22
- The following Python libraries: os, json, openai (Version 1.x is required)
23
23
-[Jupyter Notebooks](https://jupyter.org/)
24
24
- Azure OpenAI Assistants are currently available in Sweden Central, East US 2, and Australia East. For more information about model availability in those regions, see the [models guide](../concepts/models.md).
0 commit comments