Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and Stainless Bot committed May 16, 2024
1 parent 0d2d105 commit 6abc5e9
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 10 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,10 @@ jobs:
node-version: '18'

- name: Install dependencies
run: |
yarn install
run: yarn install

- name: Check types
run: |
yarn build
run: ./scripts/lint
test:
name: test
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 19
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/toddlzt%2Ftoddlzt-f0177db0b6324f53655f822042aab4713e7fe57f201b7dcfc4473491fd3fe474.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/toddlzt%2Ftoddlzt-0ec4945a61394a51a20257bed7aed1a1ebdcb79d391f6f182512c0643ba8a132.yml
8 changes: 8 additions & 0 deletions scripts/format
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

set -e

cd "$(dirname "$0")/.."

echo "==> Running eslint --fix"
./node_modules/.bin/eslint --fix --ext ts,js .
1 change: 1 addition & 0 deletions scripts/lint
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ set -e

cd "$(dirname "$0")/.."

echo "==> Running eslint"
./node_modules/.bin/eslint --ext ts,js .
1 change: 0 additions & 1 deletion scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,5 @@ else
echo
fi

# Run tests
echo "==> Running tests"
./node_modules/.bin/jest "$@"
18 changes: 18 additions & 0 deletions src/resources/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ export interface AgentResponse {
*/
enable_backchannel?: boolean;

/**
* If users stay silent for a period after agent speech, end the call. The minimum
* value allowed is 10,000 ms (10 s). By default, this is set to 600000 (10 min).
*/
end_call_after_silence_ms?: number;

/**
* Controls how sensitive the agent is to user interruptions. Value ranging from
* [0,1]. Lower value means it will take longer / more words for user to interrupt
Expand Down Expand Up @@ -342,6 +348,12 @@ export interface AgentCreateParams {
*/
enable_backchannel?: boolean;

/**
* If users stay silent for a period after agent speech, end the call. The minimum
* value allowed is 10,000 ms (10 s). By default, this is set to 600000 (10 min).
*/
end_call_after_silence_ms?: number;

/**
* Controls how sensitive the agent is to user interruptions. Value ranging from
* [0,1]. Lower value means it will take longer / more words for user to interrupt
Expand Down Expand Up @@ -528,6 +540,12 @@ export interface AgentUpdateParams {
*/
enable_backchannel?: boolean;

/**
* If users stay silent for a period after agent speech, end the call. The minimum
* value allowed is 10,000 ms (10 s). By default, this is set to 600000 (10 min).
*/
end_call_after_silence_ms?: number;

/**
* Controls how sensitive the agent is to user interruptions. Value ranging from
* [0,1]. Lower value means it will take longer / more words for user to interrupt
Expand Down
10 changes: 6 additions & 4 deletions src/resources/call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,9 @@ export interface RegisterCallResponse {
drop_call_if_machine_detected?: boolean;

/**
* If users stay silent for a period, end the call. By default, it is set to
* 600,000 ms (10 min). The minimum value allowed is 10,000 ms (10 s).
* If users stay silent for a period after agent speech, end the call. The minimum
* value allowed is 10,000 ms (10 s). This value, if set, would overwrite the agent
* level end_call_after_silence_ms parameter.
*/
end_call_after_silence_ms?: number;

Expand Down Expand Up @@ -684,8 +685,9 @@ export interface CallRegisterParams {
sample_rate: number;

/**
* If users stay silent for a period, end the call. By default, it is set to
* 600,000 ms (10 min). The minimum value allowed is 10,000 ms (10 s).
* If users stay silent for a period after agent speech, end the call. The minimum
* value allowed is 10,000 ms (10 s). This value, if set, would overwrite the agent
* level end_call_after_silence_ms parameter.
*/
end_call_after_silence_ms?: number;

Expand Down
1 change: 1 addition & 0 deletions tests/api-resources/agent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ describe('resource agent', () => {
backchannel_words: ['yeah', 'uh-huh'],
boosted_keywords: ['retell', 'kroger'],
enable_backchannel: true,
end_call_after_silence_ms: 600000,
interruption_sensitivity: 1,
language: 'en-US',
normalize_for_speech: true,
Expand Down

0 comments on commit 6abc5e9

Please sign in to comment.