Skip to content

Commit

Permalink
I154 claude cors (#7)
Browse files Browse the repository at this point in the history
* Add CORS header.

* Bump the version to 1.1.3.
  • Loading branch information
olpa authored Oct 9, 2024
1 parent 823942b commit 61f25d6
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion apis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,5 @@ The document structure will be more rich in the future. It will be based on the
# Using in NPM

```
npm install https://github.com/olpa/templating-for-api/releases/download/apis-v1.1.2/apis-v1.1.2.tar.gz
npm install https://github.com/olpa/templating-for-api/releases/download/apis-v1.1.3/apis-v1.1.3.tar.gz
```
1 change: 1 addition & 0 deletions apis/anthropic/lib/request-tpl.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ local openai = import "openai-request-tpl.jsonnet";
openai.run("https://api.anthropic.com/v1/messages", "key") + {
headers+: {
"Anthropic-version": "2023-06-01",
"Anthropic-dangerous-direct-browser-access": "true",
},
body+: {
"max_tokens": 1024,
Expand Down
1 change: 1 addition & 0 deletions apis/anthropic/test/claude-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ describe('anthropic clause', () => {
'Content-type': 'application/json',
'X-api-key': 'is a secret1',
'Anthropic-version': '2023-06-01',
'Anthropic-dangerous-direct-browser-access': 'true'
},
body: {
...fixtureRequest,
Expand Down
3 changes: 2 additions & 1 deletion apis/changelog.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Changelog

## [2024-10-02] - v1.1.2
## [2024-10-09] - v1.1.3

- Add and pack Claude fixture
- Add a CORS header


## [2024-10-02] - v1.1.0
Expand Down
2 changes: 1 addition & 1 deletion apis/dist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,5 @@ The document structure will be more rich in the future. It will be based on the
# Using in NPM

```
npm install https://github.com/olpa/templating-for-api/releases/download/apis-v1.1.2/apis-v1.1.2.tar.gz
npm install https://github.com/olpa/templating-for-api/releases/download/apis-v1.1.3/apis-v1.1.3.tar.gz
```
1 change: 1 addition & 0 deletions apis/dist/anthropic/lib/request-tpl.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ local openai = import "openai-request-tpl.jsonnet";
openai.run("https://api.anthropic.com/v1/messages", "key") + {
headers+: {
"Anthropic-version": "2023-06-01",
"Anthropic-dangerous-direct-browser-access": "true",
},
body+: {
"max_tokens": 1024,
Expand Down
3 changes: 2 additions & 1 deletion apis/dist/changelog.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Changelog

## [2024-10-02] - v1.1.2
## [2024-10-09] - v1.1.3

- Add and pack Claude fixture
- Add a CORS header


## [2024-10-02] - v1.1.0
Expand Down
2 changes: 1 addition & 1 deletion apis/dist/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tplfa-apis",
"version": "1.1.2",
"version": "1.1.3",
"description": "APIs for API templating",
"keywords": [],
"author": "Oleg Parashchenko",
Expand Down

0 comments on commit 61f25d6

Please sign in to comment.