Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/app/core/models/Trace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,18 +265,18 @@ function buildPromotedAttrsCandidate(raw: RawSpan): Record<string, unknown> {

const InvokeAgentTightening = z.object({
attrConversationId: z.string({
error: `'${GEN_AI_CONVERSATION_ID}' is required on '${
message: `'${GEN_AI_CONVERSATION_ID}' is required on '${
OPERATION_INVOKE_AGENT}' spans`,
}),
});

const GenerateContentTightening = z.object({
attrEventId: z.string({
error: `'${GCP_VERTEX_AGENT_EVENT_ID}' is required on '${
message: `'${GCP_VERTEX_AGENT_EVENT_ID}' is required on '${
OPERATION_GENERATE_CONTENT}' spans`,
}),
attrInvocationId: z.string({
error: `'${GCP_VERTEX_AGENT_INVOCATION_ID}' is required on '${
message: `'${GCP_VERTEX_AGENT_INVOCATION_ID}' is required on '${
OPERATION_GENERATE_CONTENT}' spans`,
}),
});
Expand Down Expand Up @@ -400,7 +400,7 @@ export type ValidatedSpan =
*/
function forwardIssues(
ctx: { addIssue(arg: any): void },
issues: readonly z.core.$ZodIssue[],
issues: readonly z.ZodIssue[],
): void {
for (const issue of issues) {
ctx.addIssue(issue as any);
Expand Down Expand Up @@ -455,7 +455,7 @@ function parsePromotedAttrs<T extends z.ZodObject<any>>(
* payload (rather than the post-validation typed projection, which
* duplicates information and is unfamiliar to anyone outside ADK Web).
*/
export const SpanValidator: z.ZodType<ValidatedSpan, unknown> =
export const SpanValidator: z.ZodType<ValidatedSpan> =
z.unknown().transform((rawInput, ctx): ValidatedSpan => {
const parseResult = RawSpanValidator.safeParse(rawInput);
if (!parseResult.success) {
Expand Down Expand Up @@ -529,7 +529,7 @@ export const SpanValidator: z.ZodType<ValidatedSpan, unknown> =
...(io !== undefined ? { io } : {}),
};
return result;
}) as z.ZodType<ValidatedSpan, unknown>;
}) as z.ZodType<ValidatedSpan>;

// ---------------------------------------------------------------------------
// UI-facing Span type — adds a `children` tree-structure helper on top of
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/models/trace/ExperimentalSemconv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export const CompletionDetailsLogAttributesValidator = z.object({
ResponseFinishReasonsAttrValidator.optional(),
[GEN_AI_USAGE_INPUT_TOKENS]: UsageTokensAttrValidator.optional(),
[GEN_AI_USAGE_OUTPUT_TOKENS]: UsageTokensAttrValidator.optional(),
}).loose(); // Unknown common attributes (e.g. `gen_ai.agent.name`,
}).passthrough(); // Unknown common attributes (e.g. `gen_ai.agent.name`,
// `gcp.vertex.agent.event_id`) are allowed through unchanged.

export const CompletionDetailsLogValidator = z.object({
Expand Down
8 changes: 4 additions & 4 deletions src/app/core/services/eval.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ const EVAL_ID = 'eval1';
const EVAL_RESULT_ID = 'result1';
const USER_ID = 'user1';
const SESSION_ID = 'session1';
const EVAL_SETS_PATH = `/apps/${APP_NAME}/eval_sets`;
const EVAL_SETS_PATH = `/dev/apps/${APP_NAME}/eval_sets`;
const EVAL_SET_PATH = `${EVAL_SETS_PATH}/${EVAL_SET_ID}`;
const EVAL_CASES_PATH = `${EVAL_SET_PATH}/evals`;
const EVAL_CASE_PATH = `${EVAL_CASES_PATH}/${EVAL_CASE_ID}`;
const EVAL_RESULTS_PATH = `/apps/${APP_NAME}/eval_results`;
const EVAL_RESULTS_PATH = `/dev/apps/${APP_NAME}/eval_results`;
const EVAL_RESULT_PATH = `${EVAL_RESULTS_PATH}/${EVAL_RESULT_ID}`;
const ADD_SESSION_PATH = `${EVAL_SET_PATH}/add_session`;
const RUN_EVAL_PATH = `${EVAL_SET_PATH}/run_eval`;
Expand Down Expand Up @@ -92,7 +92,7 @@ describe('EvalService', () => {
it('should call POST /apps/{appName}/eval-sets with correct body', () => {
service.createNewEvalSet(APP_NAME, EVAL_SET_ID).subscribe();
const req = httpTestingController.expectOne(
API_SERVER_BASE_URL + `/apps/${APP_NAME}/eval-sets`,
API_SERVER_BASE_URL + `/dev/apps/${APP_NAME}/eval-sets`,
);
expect(req.request.method).toEqual('POST');
expect(req.request.body).toEqual({
Expand All @@ -111,7 +111,7 @@ describe('EvalService', () => {
const resultP = firstValueFrom(
service.createNewEvalSet(APP_NAME, EVAL_SET_ID),
);
const req = httpTestingController.expectOne(`/apps/${APP_NAME}/eval-sets`);
const req = httpTestingController.expectOne(`/dev/apps/${APP_NAME}/eval-sets`);
req.flush(null);
const result = await resultP;
expect(result).toBeNull();
Expand Down
2 changes: 1 addition & 1 deletion src/assets/config/runtime-config.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"backendUrl": "http://127.0.0.1:8000"
"backendUrl": ""
}
Loading