Skip to content

Commit

Permalink
update json format used for prompt and response
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Tip committed Jul 1, 2024
1 parent c19dc12 commit 14d6c16
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
11 changes: 11 additions & 0 deletions .github/benchmarks11.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
https://github.com/manuelmhtr/countries-and-timezones/tree/e34cb4b6832795cbac8d44f6f9c97eb1038b831b
https://github.com/infusion/Complex.js/tree/d995ca105e8adef4c38d0ace50643daf84e0dd1c
https://gitlab.com/autokent/crawler-url-parser/tree/202c5b25ad693d284804261e2b3815fe66e0723e
https://gitlab.com/demsking/image-downloader/tree/19a53f652824bd0c612cc5bcd3a2eb173a16f938
https://github.com/rainder/node-geo-point/tree/c839d477ff7a48d1fc6574495cbbc6196161f494
https://github.com/jprichardson/node-jsonfile/tree/9c6478a85899a9318547a6e9514b0403166d8c5c
https://github.com/chakrit/node-uneval/tree/7578dc67090f650a171610a08ea529eba9d27438
https://github.com/swang/plural/tree/f0027d66ecb37ce0108c8bcb4a6a448d1bf64047
https://github.com/pull-stream/pull-stream/tree/29b4868bb3864c427c3988855c5d65ad5cb2cb1c
https://gitlab.com/cptpackrat/spacl-core/tree/fcb8511a0d01bdc206582cfacb3e2b01a0288f6a
https://github.com/maugenst/zip-a-folder/tree/5089113647753d5086ea20f052f9d29840866ee1
9 changes: 3 additions & 6 deletions src/chatmodel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,8 @@ export class ChatModel implements ICompletionModel {

const postOptions = {
model: this.model,
system: "You are a programming assistant.",
messages: [
{
role: "system",
content: "You are a programming assistant.",
},
{
role: "user",
content: prompt,
Expand Down Expand Up @@ -138,8 +135,8 @@ export class ChatModel implements ICompletionModel {
}

const completions = new Set<string>();
for (const choice of json.choices) {
const content = choice.message.content;
for (const choice of json.content) {
const content = choice.text;
completions.add(content);
}
return completions;
Expand Down

0 comments on commit 14d6c16

Please sign in to comment.