-
I'm wanting to create a coding assistant using gpt-4. How do I connect my openai account using semantic-kernel w/ gpt-4? Is there an example somewhere? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
hi @unicomp21, SK supports all OpenAI models providing a Text Completion API. However, GPT-4 is in still in limited beta, you can join the waitlist here https://openai.com/waitlist/gpt-4-api |
Beta Was this translation helpful? Give feedback.
-
I've already joined, and been accepted. Have been using gpt-4 via the webui for couple days now. When using semantic-kernel, what modelid, etc. should I be using for gpt-4? |
Beta Was this translation helpful? Give feedback.
-
Hello @unicomp21 , you can check available models for gpt-4 at https://platform.openai.com/docs/models/gpt-4
|
Beta Was this translation helpful? Give feedback.
-
Lol, I told gpt4 to write me a typescript client, and went from there.
…On Tue, Mar 21, 2023 at 10:16 AM MrMoo2000 ***@***.***> wrote:
Hi @unicomp21 <https://github.com/unicomp21> I was wondering if you were
able to get gpt-4 running?
I'm not sure if I'm missing something on my end, but it looks like in the
OpenAITextCompletion, the URL is formed as the following:
var url = $"{OpenaiEndpoint}/engines/{this._modelId}/completions";
It looks like in order to use gpt-4, we need to use a different endpoint,
/v1/chat/completions
https://platform.openai.com/docs/models/model-endpoint-compatibility
I was attempting to use the model "gpt-3.5-turbo", but every time I get
the error, "Error: InvalidRequest: The request is not valid, HTTP status:
NotFound". I was hoping to use gpt 3.5 over text-davinci-003, because of
the cost savings
https://platform.openai.com/docs/guides/chat/chat-vs-completions
Here is the following where I was using the example from the readme, but
with gpt-3.5. I recognize I'm calling AddOpenAICompletionBackend, but I
don't see a different method to call the chat endpoint.
`using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.KernelExtensions;
var kernel = Kernel.Builder.Build();
kernel.Config.AddOpenAICompletionBackend(
"OpenAI_gpt",
"gpt-3.5-turbo",
"APIKEY"
);
string skPrompt = @"
{{$input}}
Give me the TLDR in 5 words.
";
string textToSummarize = @"
1.
A robot may not injure a human being or, through inaction,
allow a human being to come to harm.
2.
A robot must obey orders given it by human beings except where
such orders would conflict with the First Law.
3.
A robot must protect its own existence as long as such protection
does not conflict with the First or Second Law.
";
var tldrFunction = kernel.CreateSemanticFunction(skPrompt);
var summary = await kernel.RunAsync(textToSummarize, tldrFunction);
Console.WriteLine(summary);`
—
Reply to this email directly, view it on GitHub
<#112 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEFL7JNN7PKQA6TFCJBADDW5HA3VANCNFSM6AAAAAAWAG24Z4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
hi @unicomp21, SK supports all OpenAI models providing a Text Completion API. However, GPT-4 is in still in limited beta, you can join the waitlist here https://openai.com/waitlist/gpt-4-api