Skip to content

Commit e2d9b78

Browse files
author
h1alexbel
committed
titled.ts
1 parent cc56f48 commit e2d9b78

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/main.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import OpenAI from "openai";
2929
import {DeepInfra} from "./deep-infra";
3030
import {ChatGpt} from "./chat-gpt";
3131
import {Feedback} from "./feedback";
32+
import {Titled} from "./titled";
3233

3334
export let github: {
3435
context: {
@@ -95,7 +96,9 @@ async function run() {
9596
await new ChatGpt(
9697
new OpenAI({apiKey: core.getInput("openai_token")}),
9798
model
98-
).analyze(body),
99+
).analyze(
100+
new Titled(smart.title, body).asString()
101+
),
99102
octokit,
100103
issue,
101104
smart.user?.login
@@ -105,10 +108,7 @@ async function run() {
105108
const model = core.getInput("deepinfra_model");
106109
const answer = await new DeepInfra(deepinfra, model)
107110
.analyze(
108-
`
109-
Title: ${smart.title}
110-
Report body: ${body}
111-
`
111+
new Titled(smart.title, body).asString()
112112
);
113113
await new Feedback(
114114
answer,

0 commit comments

Comments
 (0)