Skip to content

Commit

Permalink
tsx is unnecessary
Browse files Browse the repository at this point in the history
  • Loading branch information
fiskus committed Jun 4, 2024
1 parent 54c32c6 commit 16ee545
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,18 @@ import { CONTENT_TYPE, bedrockBodyToMessage, createMessage } from './Message'

const MODEL_ID = 'anthropic.claude-3-sonnet-20240229-v1:0'
const ANTHROPIC_VERSION = 'bedrock-2023-05-31'

Check warning on line 14 in catalog/app/utils/AWS/Bedrock/Bedrock.ts

View check run for this annotation

Codecov / codecov/patch/informational

catalog/app/utils/AWS/Bedrock/Bedrock.ts#L13-L14

Added lines #L13 - L14 were not covered by tests

// https://docs.aws.amazon.com/bedrock/latest/userguide/key-definitions.html
// Token – A sequence of characters that a model can interpret or predict as a single unit of meaning.
// Not a word, but eiher word, or phrase, or punctuaction mark, or word suffix or prefix.
export const MAX_TOKENS = 100000

Check warning on line 19 in catalog/app/utils/AWS/Bedrock/Bedrock.ts

View check run for this annotation

Codecov / codecov/patch/informational

catalog/app/utils/AWS/Bedrock/Bedrock.ts#L19

Added line #L19 was not covered by tests

// Bedrock calls are not free
// https://aws.amazon.com/bedrock/pricing/
//
// You can use `MOCK_BEDROCK = true` to mock Bedrock API response
const MOCK_BEDROCK = false

Check warning on line 25 in catalog/app/utils/AWS/Bedrock/Bedrock.ts

View check run for this annotation

Codecov / codecov/patch/informational

catalog/app/utils/AWS/Bedrock/Bedrock.ts#L25

Added line #L25 was not covered by tests

export function useBedrock(
overrides?: Partial<BedrockRuntime.Types.ClientConfiguration>,

Check warning on line 28 in catalog/app/utils/AWS/Bedrock/Bedrock.ts

View check run for this annotation

Codecov / codecov/patch/informational

catalog/app/utils/AWS/Bedrock/Bedrock.ts#L27-L28

Added lines #L27 - L28 were not covered by tests
) {
Expand Down Expand Up @@ -66,6 +76,4 @@ function useMock() {
)
}

const MOCK_BEDROCK = false

export const use = MOCK_BEDROCK ? useMock : useBedrock

0 comments on commit 16ee545

Please sign in to comment.