Skip to content

Commit 0ffeabd

Browse files
authored
Harrison/serialize llm chain (#671)
1 parent 499e54e commit 0ffeabd

File tree

14 files changed

+578
-14
lines changed

14 files changed

+578
-14
lines changed

docs/modules/chains/generic/llm.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"model_name": "text-davinci-003",
3+
"temperature": 0.0,
4+
"max_tokens": 256,
5+
"top_p": 1,
6+
"frequency_penalty": 0,
7+
"presence_penalty": 0,
8+
"n": 1,
9+
"best_of": 1,
10+
"request_timeout": null,
11+
"logit_bias": {},
12+
"_type": "openai"
13+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"memory": null,
3+
"verbose": true,
4+
"prompt": {
5+
"input_variables": [
6+
"question"
7+
],
8+
"output_parser": null,
9+
"template": "Question: {question}\n\nAnswer: Let's think step by step.",
10+
"template_format": "f-string"
11+
},
12+
"llm": {
13+
"model_name": "text-davinci-003",
14+
"temperature": 0.0,
15+
"max_tokens": 256,
16+
"top_p": 1,
17+
"frequency_penalty": 0,
18+
"presence_penalty": 0,
19+
"n": 1,
20+
"best_of": 1,
21+
"request_timeout": null,
22+
"logit_bias": {},
23+
"_type": "openai"
24+
},
25+
"output_key": "text",
26+
"_type": "llm_chain"
27+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"memory": null,
3+
"verbose": true,
4+
"prompt_path": "prompt.json",
5+
"llm_path": "llm.json",
6+
"output_key": "text",
7+
"_type": "llm_chain"
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"input_variables": [
3+
"question"
4+
],
5+
"output_parser": null,
6+
"template": "Question: {question}\n\nAnswer: Let's think step by step.",
7+
"template_format": "f-string"
8+
}

0 commit comments

Comments
 (0)