Skip to content

Commit

Permalink
increased max token size for gpt-vision requests
Browse files Browse the repository at this point in the history
  • Loading branch information
fingerthief committed Mar 2, 2024
1 parent 5208568 commit 8b38f12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<div class="settings-header">
<h2 data-bind="click: () => { window.location.reload(true); }">
<span class="fa-solid fa-arrows-rotate"></span>
Settings | V3.4.0</h2>
Settings | V3.4.1</h2>
</div>
<div class="sidebar-content-container">
<div class="api-key">
Expand Down Expand Up @@ -186,7 +186,7 @@ <h2>Conversations</h2>
<span class="fa-solid fa-circle-user fa-lg icon" data-bind="visible: role === 'user'"></span>
<span data-bind="text: (role === 'user' ? 'User' : (role !== 'user' && $index() > 0 && $parent.messages()[$index() - 1].content.toLowerCase().startsWith('image::')) ? 'DALL-E' : 'GPT')"></span>
</div>
<span id="message-contents" data-bind="html: content.toLowerCase().includes('https://personalizedweather.onrender.com/') ? content : $parent.formatMessage(content, false)"></span>
<span id="message-contents" data-bind="html: $parent.formatMessage(content, false)"></span>
</div>
</div>
</div>
Expand Down
3 changes: 1 addition & 2 deletions js/app-view-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ export function AppViewModel() {
content: visionFormattedMessages
}
],
max_tokens: 1200
max_tokens: 4096
};

fetch("https://api.openai.com/v1/chat/completions", {
Expand All @@ -532,7 +532,6 @@ export function AppViewModel() {
self.messages.push({ role: 'assistant', content: data.choices[0].message.content });

self.saveMessages();
self.scrollToBottom();
self.isAnalyzingImage(false);
})
.catch(error => console.error('Error:', error));
Expand Down

0 comments on commit 8b38f12

Please sign in to comment.