fix: include question in prompt
All checks were successful
Dependabot Auto-Merge / dependabot (pull_request) Has been skipped
Dependabot Auto-Merge / devopsbot (pull_request) Has been skipped
Dependabot Auto-Merge / rennovatebot (pull_request) Has been skipped
Unit Tests / unittest (pull_request) Successful in 50s
COMMIT LINT / commitlint (pull_request) Successful in 1m25s
All checks were successful
Dependabot Auto-Merge / dependabot (pull_request) Has been skipped
Dependabot Auto-Merge / devopsbot (pull_request) Has been skipped
Dependabot Auto-Merge / rennovatebot (pull_request) Has been skipped
Unit Tests / unittest (pull_request) Successful in 50s
COMMIT LINT / commitlint (pull_request) Successful in 1m25s
This commit is contained in:
24
action.yml
24
action.yml
@@ -1,25 +1,25 @@
|
|||||||
name: 'Issue Embedder'
|
name: "Issue Embedder"
|
||||||
description: 'Sends github issues to the lake to embed into vector form'
|
description: "Sends github issues to the lake to embed into vector form"
|
||||||
inputs:
|
inputs:
|
||||||
api_url:
|
api_url:
|
||||||
description: 'api url'
|
description: "api url"
|
||||||
default: 'http://agents-api.servc-agents:3000'
|
default: "http://agent-api.k8s.private"
|
||||||
required: false
|
required: false
|
||||||
api_token:
|
api_token:
|
||||||
description: 'API token for authentication'
|
description: "API token for authentication"
|
||||||
default: ''
|
default: ""
|
||||||
required: false
|
required: false
|
||||||
route:
|
route:
|
||||||
default: 'agent-lake'
|
default: "agent-lake"
|
||||||
required: false
|
required: false
|
||||||
method:
|
method:
|
||||||
default: 'embeddings_insert'
|
default: "embeddings_insert"
|
||||||
required: false
|
required: false
|
||||||
debug:
|
debug:
|
||||||
description: 'Enable debug mode'
|
description: "Enable debug mode"
|
||||||
default: 'false'
|
default: "false"
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'node20'
|
using: "node20"
|
||||||
main: 'dist/index.js'
|
main: "dist/index.js"
|
||||||
|
|||||||
7
dist/index.js
vendored
7
dist/index.js
vendored
@@ -32836,7 +32836,7 @@ const core = __nccwpck_require__(7012);
|
|||||||
const github = __nccwpck_require__(7940);
|
const github = __nccwpck_require__(7940);
|
||||||
|
|
||||||
const apiUrl =
|
const apiUrl =
|
||||||
core.getInput("api_url") || "http://agents-api.servc-agents:3000";
|
core.getInput("api_url") || "http://agent-api.k8s.private";
|
||||||
const apiToken = core.getInput("api_token");
|
const apiToken = core.getInput("api_token");
|
||||||
const route = core.getInput("route") || "agent-lake";
|
const route = core.getInput("route") || "agent-lake";
|
||||||
const method = core.getInput("method") || "embeddings_insert";
|
const method = core.getInput("method") || "embeddings_insert";
|
||||||
@@ -32961,7 +32961,10 @@ async function run() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const embedText = body ? body.trim() : String(comments[0]).trim();
|
const embedText = body ? body.trim() : String(comments[0]).trim();
|
||||||
const storeText = String(comments[comments.length - 1]).trim();
|
const storeText = [
|
||||||
|
'Question: ' + embedText,
|
||||||
|
String(comments[comments.length - 1]).trim()
|
||||||
|
].join('\n')
|
||||||
|
|
||||||
const requestPayload = {
|
const requestPayload = {
|
||||||
type: "input",
|
type: "input",
|
||||||
|
|||||||
7
index.js
7
index.js
@@ -4,7 +4,7 @@ const core = require("@actions/core");
|
|||||||
const github = require("@actions/github");
|
const github = require("@actions/github");
|
||||||
|
|
||||||
const apiUrl =
|
const apiUrl =
|
||||||
core.getInput("api_url") || "http://agents-api.servc-agents:3000";
|
core.getInput("api_url") || "http://agent-api.k8s.private";
|
||||||
const apiToken = core.getInput("api_token");
|
const apiToken = core.getInput("api_token");
|
||||||
const route = core.getInput("route") || "agent-lake";
|
const route = core.getInput("route") || "agent-lake";
|
||||||
const method = core.getInput("method") || "embeddings_insert";
|
const method = core.getInput("method") || "embeddings_insert";
|
||||||
@@ -129,7 +129,10 @@ async function run() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const embedText = body ? body.trim() : String(comments[0]).trim();
|
const embedText = body ? body.trim() : String(comments[0]).trim();
|
||||||
const storeText = String(comments[comments.length - 1]).trim();
|
const storeText = [
|
||||||
|
'Question: ' + embedText,
|
||||||
|
String(comments[comments.length - 1]).trim()
|
||||||
|
].join('\n')
|
||||||
|
|
||||||
const requestPayload = {
|
const requestPayload = {
|
||||||
type: "input",
|
type: "input",
|
||||||
|
|||||||
Reference in New Issue
Block a user