Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into aicore-e2e-tests
Browse files Browse the repository at this point in the history
merge main
  • Loading branch information
shibeshduw committed Sep 12, 2024
2 parents 6a3883b + bc2de8c commit 7f8cf16
Show file tree
Hide file tree
Showing 7 changed files with 199 additions and 88 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('OpenAI response', () => {
it('should return default choice index with convenience functions', () => {
expect(openAiChatClientResponse.getFinishReason()).toBe('stop');
expect(openAiChatClientResponse.getContent()).toBe(
"The deepest place on Earth is located in the western Pacific Ocean. It's called the Mariana Trench."
'The deepest place on Earth is located in the Western Pacific Ocean and is known as the Mariana Trench.'
);
});

Expand Down
108 changes: 39 additions & 69 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sample-code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
"@sap-ai-sdk/foundation-models": "workspace:^",
"@sap-ai-sdk/orchestration": "workspace:^",
"@types/express": "^4.17.21",
"express": "^4.20.0"
"express": "^4.21.0"
}
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,63 @@
{
"choices": [
{
"content_filter_results": {
"hate": {
"filtered": false,
"severity": "safe"
},
"self_harm": {
"filtered": false,
"severity": "safe"
},
"sexual": {
"filtered": false,
"severity": "safe"
},
"violence": {
"filtered": false,
"severity": "safe"
}
},
"finish_reason": "stop",
"index": 0,
"message": {
"content": "The deepest place on Earth is located in the western Pacific Ocean. It's called the Mariana Trench.",
"content": "The deepest place on Earth is located in the Western Pacific Ocean and is known as the Mariana Trench.",
"role": "assistant"
}
}
],
"created": 1718206847,
"id": "chatcmpl-kkli",
"created": 1725457796,
"id": "chatcmpl-A3kgOwg9B6j87n0IkoCFCUCxRSwQZ",
"model": "gpt-4-32k",
"object": "chat.completion",
"prompt_filter_results": [
{
"content_filter_results": {
"hate": {
"filtered": false,
"severity": "safe"
},
"jailbreak": {
"detected": false,
"filtered": false
},
"self_harm": {
"filtered": false,
"severity": "safe"
},
"sexual": {
"filtered": false,
"severity": "safe"
},
"violence": {
"filtered": false,
"severity": "safe"
}
},
"prompt_index": 0
}
],
"system_fingerprint": null,
"usage": {
"completion_tokens": 22,
Expand Down
2 changes: 1 addition & 1 deletion tests/smoke-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@sap-ai-sdk/ai-api": "canary",
"@sap-ai-sdk/foundation-models": "canary",
"@sap-ai-sdk/orchestration": "canary",
"express": "^4.20.0"
"express": "^4.21.0"
},
"devDependencies": {
"@types/express": "^4.17.21",
Expand Down
Loading

0 comments on commit 7f8cf16

Please sign in to comment.