Skip to content

Commit

Permalink
Solving issue #122 (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcominerva authored Oct 16, 2023
2 parents 6471b90 + 30c12ba commit 7f547d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ In this way, the message will be sent to the chat completion API, but it and the
On the other hand, in some scenarios, it could be useful to manually add a chat interaction (i.e., a question followed by an answer) to the conversation history. For example, we may want to add a message that was generated by a bot. In this case, we can use the **AddInteractionAsync** method:

```csharp
await chatGptClient.AskInteractionAsync(conversationId, question: "What is the weather like in Taggia?",
await chatGptClient.AddInteractionAsync(conversationId, question: "What is the weather like in Taggia?",
answer: "It's Always Sunny in Taggia");
```

Expand Down Expand Up @@ -326,7 +326,7 @@ The _preserveSetup_ argument allows to decide whether mantain also the _system_
With function calling, we can describe functions and have the model intelligently choose to output a JSON object containing arguments to call those functions. This is a new way to more reliably connect GPT's capabilities with external tools and APIs.

> **Note**
Currently, on Azure OpenAI Service, function calling is supported in the following models in API version `2023-07-01-preview`:
Currently, on Azure OpenAI Service, function calling is supported in the following models in API version `2023-07-01-preview` or later:
>- gpt-35-turbo-0613
>- gpt-35-turbo-16k-0613
>- gpt-4-0613
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public AzureChatGptServiceConfiguration(IConfiguration configuration)
ArgumentNullException.ThrowIfNull(configuration);

ResourceName = configuration.GetValue<string>("ResourceName");
ArgumentNullException.ThrowIfNull(nameof(ResourceName));
ArgumentNullException.ThrowIfNull(ResourceName);

ApiVersion = configuration.GetValue<string>("ApiVersion") ?? DefaultApiVersion;

Expand All @@ -78,7 +78,7 @@ public AzureChatGptServiceConfiguration(IConfiguration configuration)
/// <inheritdoc />
public override Uri GetChatCompletionEndpoint(string? modelName)
{
ArgumentNullException.ThrowIfNull(nameof(modelName));
ArgumentNullException.ThrowIfNull(modelName);

var endpoint = new Uri($"https://{ResourceName}.openai.azure.com/openai/deployments/{modelName}/chat/completions?api-version={ApiVersion}");
return endpoint;
Expand Down

0 comments on commit 7f547d7

Please sign in to comment.