Skip to content

Commit

Permalink
feat: add 'model' in response
Browse files Browse the repository at this point in the history
  • Loading branch information
jtsang4 committed May 14, 2023
1 parent fb37c9d commit 2e25e9a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions claude_to_chatgpt/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def claude_to_chatgpt_response_stream(self, claude_response, prev_decoded_respon
"id": f"chatcmpl-{str(time.time())}",
"object": "chat.completion.chunk",
"created": int(time.time()),
"model": "gpt-3.5-turbo-0301",
"usage": {
"prompt_tokens": 0,
"completion_tokens": completion_tokens,
Expand Down Expand Up @@ -102,6 +103,7 @@ def claude_to_chatgpt_response(self, claude_response):
"id": f"chatcmpl-{str(time.time())}",
"object": "chat.completion",
"created": int(time.time()),
"model": "gpt-3.5-turbo-0301",
"usage": {
"prompt_tokens": 0,
"completion_tokens": completion_tokens,
Expand Down
3 changes: 2 additions & 1 deletion cloudflare-worker.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const version = '0.3.0';
const version = '0.3.1';

addEventListener('fetch', (event) => {
event.respondWith(handleRequest(event.request));
Expand Down Expand Up @@ -45,6 +45,7 @@ function claudeToChatGPTResponse(claudeResponse, stream = false) {
const result = {
id: `chatcmpl-${timestamp}`,
created: timestamp,
model: 'gpt-3.5-turbo-0301',
usage: {
prompt_tokens: 0,
completion_tokens: completionTokens,
Expand Down

0 comments on commit 2e25e9a

Please sign in to comment.