Skip to content

Commit

Permalink
Anthropic support
Browse files Browse the repository at this point in the history
  • Loading branch information
zakkor committed Aug 23, 2024
1 parent ba66e06 commit 058f541
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion server/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ for GOOS in "${GOOS_VALUES[@]}"; do
done

# Create a new release with the new builds
gh release create v0.0.1 dist/* dist-client.tar.gz --notes ''
gh release create v0.0.3 dist/* dist-client.tar.gz --notes ''

echo "Builds and release process completed successfully."
4 changes: 0 additions & 4 deletions src/SettingsModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,6 @@
<label class="flex flex-col text-[10px] uppercase tracking-wide">
<span class="mb-2 ml-[3px] flex items-center gap-2">
Anthropic API Key
<Tooltip icon={feAlertCircle}>
Anthropic does not allow their models to be used directly through a browser. You'll
need to run a proxy server on your computer in order for this provider to work.
</Tooltip>
</span>
<input
type="text"
Expand Down
1 change: 1 addition & 0 deletions src/convo.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export async function complete(convo, onupdate, onabort) {
? {
'x-api-key': provider.apiKeyFn(),
'anthropic-version': '2023-06-01',
'anthropic-dangerous-direct-browser-access': 'true',
}
: {}),
'Content-Type': 'application/json',
Expand Down
2 changes: 1 addition & 1 deletion src/providers.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const providers = [
},
{
name: 'Anthropic',
url: 'http://localhost:8090/https://api.anthropic.com',
url: 'https://api.anthropic.com',
completionUrl: '/v1/messages',
apiKeyFn: () => get(anthropicAPIKey),
},
Expand Down

0 comments on commit 058f541

Please sign in to comment.