MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / formatSystemInstruction

Function formatSystemInstruction

out/cli.cjs:79270–79284  ·  view source on GitHub ↗
(input)

Source from the content-addressed store, hash-verified

79268 requestOptions
79269 );
79270 const responseJson = await response.json();
79271 const enhancedResponse = addHelpers(responseJson);
79272 return {
79273 response: enhancedResponse
79274 };
79275}
79276function formatSystemInstruction(input) {
79277 if (input == null) {
79278 return void 0;
79279 } else if (typeof input === "string") {
79280 return { role: "system", parts: [{ text: input }] };
79281 } else if (input.text) {
79282 return { role: "system", parts: [input] };
79283 } else if (input.parts) {
79284 if (!input.role) {
79285 return { role: "system", parts: input.parts };
79286 } else {
79287 return input;

Callers 2

constructorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…