Skip to content

Commit a7e0ee7

Browse files
committed
don't parse creds as comma separated
Signed-off-by: Grant Linville <[email protected]>
1 parent fe56699 commit a7e0ee7

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

docs/docs/03-tools/04-credentials.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,11 @@ LLM about it or even tell the LLM about the tool.
4141
If GPTScript has called the credential provider tool in the same context (more on that later), then it will use the stored
4242
credential instead of fetching it again.
4343

44-
You can also specify multiple credential tools for the same script:
44+
You can also specify multiple credential tools for the same script, but they must be on separate lines:
4545

4646
```yaml
47-
credentials: credential-tool-1.gpt, credential-tool-2.gpt
47+
credentials: credential-tool-1.gpt
48+
credentials: credential-tool-2.gpt
4849

4950
(tool stuff here)
5051
```

pkg/parser/parser.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func isParam(line string, tool *types.Tool) (_ bool, err error) {
138138
return false, err
139139
}
140140
case "credentials", "creds", "credential", "cred":
141-
tool.Parameters.Credentials = append(tool.Parameters.Credentials, csv(value)...)
141+
tool.Parameters.Credentials = append(tool.Parameters.Credentials, value)
142142
default:
143143
return false, nil
144144
}

test.gpt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
cred: github.com/g-linville/credential as mycred1 with hey as message and hey as field and HEY as env
2+
cred: github.com/g-linville/credential as mycred2 with yo as message and yo as field and YO as env
3+
4+
echo hello

0 commit comments

Comments
 (0)