-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow multiple messages (context window) to be passed #1146
Conversation
@@ -40,28 +44,23 @@ export async function executePrompt(args: { | |||
|
|||
const response = await openai.chat.completions.create({ | |||
model: 'gpt-4-1106-preview', | |||
messages: [ | |||
{ | |||
role: 'user', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the name for the session?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which one?
The model is gpt-4-turbo. The session and context window will get built by the client so the session name is implict
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another question: What is the purpose of role
in the API?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To define system prompts vs. user prompts.
Co-authored-by: Stephan Kulla <git.mail@kulla.me>
Co-authored-by: Stephan Kulla <git.mail@kulla.me>
Co-authored-by: Stephan Kulla <git.mail@kulla.me>
|
||
const record = await dataSources.model.serlo.executePrompt({ | ||
...payload, | ||
messages: messages as OpenAIMessages, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a nicer way @kulla?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, quite simple see 41d958c
* Check for any empty message * KISS
Context window will be built by the frontend for now. Eventually, we'll be able to migrate to the assistance API https://platform.openai.com/docs/assistants/how-it-works/creating-assistants