forked from aws-samples/bedrock-claude-chat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
29 lines (26 loc) · 823 Bytes
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Configure generation parameter for Claude chat response.
# Adjust the values according to your application.
# See: https://docs.anthropic.com/claude/reference/complete_post
GENERATION_CONFIG = {
"max_tokens": 2000,
"top_k": 250,
"top_p": 0.999,
"temperature": 0,
"stop_sequences": ["Human: ", "Assistant: "],
}
# Configure embedding parameter.
EMBEDDING_CONFIG = {
# DO NOT change `model_id` (currently other models are not supported)
"model_id": "cohere.embed-multilingual-v3",
# NOTE: consider that cohere allows up to 2048 tokens per request
"chunk_size": 1000,
"chunk_overlap": 200,
}
# Configure search parameter to fetch relevant documents from vector store.
SEARCH_CONFIG = {
"max_results": 5,
}
# Configure bedrock client.
BEDROCK_CONFIG = {
"max_retries": 5,
}