pctx_codegen 0.3.0

Code generation utilities for pctx
Documentation
---
source: crates/pctx_codegen/tests/tool.rs
expression: impl_code
---
export type GetWeatherInput = {
  location: string;

  units?: "celsius" | "fahrenheit" | undefined;
};

export type GetWeatherOutput = {
  temperature: number;

  condition: string;

  humidity?: number | undefined;
};

/**
 * Get the current weather for a given location
 */
export async function getWeather(
  input: GetWeatherInput,
): Promise<GetWeatherOutput> {
  return await invokeInternal({
    name: "test_server__get_weather",
    arguments: input,
  });
}