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: 11-integrating-with-function-calling/README.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ This lesson will cover:
21
21
After completing this lesson you will be able to:
22
22
23
23
- Explain the purpose of using function calling.
24
-
- Setup Function Call using the Azure Open AI Service.
24
+
- Setup Function Call using the Azure OpenAI Service.
25
25
- Design effective function calls for your application's use case.
26
26
27
27
## Scenario: improving our chatbot with functions
@@ -30,7 +30,7 @@ For this lesson, we want to build a feature for our education startup that allow
30
30
31
31
To complete this scenario we will use a combination of:
32
32
33
-
-`Azure Open AI` to create a chat experience for the user.
33
+
-`Azure OpenAI` to create a chat experience for the user.
34
34
-`Microsoft Learn Catalog API` to help users find courses based on the request of the user.
35
35
-`Function Calling` to take the user's query and send it to a function to make the API request.
36
36
@@ -40,7 +40,7 @@ To get started, let's look at why we would want to use function calling in the f
40
40
41
41
Before function calling, responses from an LLM were unstructured and inconsistent. Developers were required to write complex validation code to make sure they are able to handle each variation of a response. Users could not get answers like "What is the current weather in Stockholm?". This is because models were limited to the time the data was trained on.
42
42
43
-
Function Calling is a feature of the Azure Open AI Service to overcome to the following limitations:
43
+
Function Calling is a feature of the Azure OpenAI Service to overcome to the following limitations:
44
44
45
45
-**Consistent response format**. If we can better control the response format we can more easily integrate the response downstream to other systems.
46
46
-**External data**. Ability to use data from other sources of an application in a chat context.
@@ -53,7 +53,7 @@ Let's look at the example that illustrates the response format problem:
53
53
54
54
Let's say we want to create a database of student data so we can suggest the right course to them. Below we have two descriptions of students that are very similar in the data they contain.
55
55
56
-
1. Create a connection to our Azure Open AI resource:
56
+
1. Create a connection to our Azure OpenAI resource:
57
57
58
58
```python
59
59
import os
@@ -70,7 +70,7 @@ Let's say we want to create a database of student data so we can suggest the rig
70
70
deployment=os.environ['AZURE_OPENAI_DEPLOYMENT']
71
71
```
72
72
73
-
Below is some Python code for configuring our connection to Azure Open AI where we set `api_type`, `api_base`, `api_version` and `api_key`.
73
+
Below is some Python code for configuring our connection to Azure OpenAI where we set `api_type`, `api_base`, `api_version` and `api_key`.
74
74
75
75
1. Creating two student descriptions using variables `student_1_description` and `student_2_description`.
76
76
@@ -114,7 +114,7 @@ Let's say we want to create a database of student data so we can suggest the rig
114
114
115
115
The above prompts instruct the LLM to extract information and return the response in JSON format.
116
116
117
-
1. After setting up the prompts and the connection to Azure Open AI, we will now send the prompts to the LLM by using `openai.ChatCompletion`. We store the prompt in the `messages` variable and assign the role to `user`. This is to mimic a message from a user being written to a chatbot.
117
+
1. After setting up the prompts and the connection to Azure OpenAI, we will now send the prompts to the LLM by using `openai.ChatCompletion`. We store the prompt in the `messages` variable and assign the role to `user`. This is to mimic a message from a user being written to a chatbot.
118
118
119
119
```python
120
120
# response from prompt one
@@ -433,7 +433,7 @@ Ok, so we created `functions` variables and a corresponding Python function, how
433
433
434
434
## Assignment
435
435
436
-
To continue your learning of Azure Open AI Function Calling you can build:
436
+
To continue your learning of Azure OpenAI Function Calling you can build:
437
437
438
438
- More parameters of the function that might help learners find more courses.
439
439
- Create another function call that takes more information from the learner like their native language
0 commit comments