Merge pull request #18 from langchain-ai/brace/hookup-accommodations

feat: Hookup accommodations actions to graph
This commit is contained in:
Brace Sproul
2025-03-05 13:32:06 -08:00
committed by GitHub
7 changed files with 123 additions and 61 deletions

View File

@@ -61,6 +61,7 @@ export async function extraction(
numberOfGuests: z
.number()
.optional()
.default(2)
.describe("The number of guests for the trip"),
});
@@ -113,7 +114,10 @@ Extract only what is specified by the user. It is okay to leave fields blank if
const extractionDetailsWithDefaults: TripDetails = {
startDate,
endDate,
numberOfGuests: extractedDetails.numberOfGuests ?? 2,
numberOfGuests:
extractedDetails.numberOfGuests !== undefined
? extractedDetails.numberOfGuests
: 2,
location: extractedDetails.location,
};