MCPcopy Index your code
hub / github.com/github/copilot-sdk / parseHttpExchange

Function parseHttpExchange

test/harness/replayingCapiProxy.ts:957–965  ·  view source on GitHub ↗
(
  requestBody: string,
  responseBody: string | undefined,
  requestHeaders?: Record<string, string | string[] | undefined>,
)

Source from the content-addressed store, hash-verified

955}
956
957async function parseHttpExchange(
958 requestBody: string,
959 responseBody: string | undefined,
960 requestHeaders?: Record<string, string | string[] | undefined>,
961): Promise<ParsedHttpExchange> {
962 const request = JSON.parse(requestBody) as ChatCompletionCreateParamsBase;
963 const response = await parseOpenAIResponse(responseBody);
964 return { request, response, requestHeaders };
965}
966
967// Converts a single HTTP exchange (request + response) into a normalized conversation
968async function transformHttpExchange(

Callers 2

performRequestMethod · 0.85
transformHttpExchangeFunction · 0.85

Calls 2

parseOpenAIResponseFunction · 0.85
parseMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…