mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 19:04:02 +00:00
Merge main into feat/voice-core
Keeps the voice-core prompt rules and adds main's world-query and vessels-vs-visuals rules; the tool catalog wraps the deixis-aware runner. Also fixes two things the branch had before the merge: - Live voice could not start: OpenAI rejects track_entity's top-level anyOf. Model-facing tools now omit top-level combinators; the runner and benchmark still require a query or a referent. - The Contacts-centred analyst answer dropped the viewport coverage note.
This commit is contained in:
commit
e7cb9b02b5
191 files changed
+20005
-1450
No files matched your search
@@ -901,12 +901,20 @@ export function createActionTools(descriptions = {}) {
|
||||
if (!schemas.some((schema) => schema.name === name))
|
||||
throw new TypeError('Unknown action description: ' + name);
|
||||
}
|
||||
return schemas.map((schema) => ({
|
||||
type: 'function',
|
||||
...describe(schema, descriptions[schema.name] || {}),
|
||||
}));
|
||||
return schemas.map((schema) => {
|
||||
const tool = {
|
||||
type: 'function',
|
||||
...describe(schema, descriptions[schema.name] || {}),
|
||||
};
|
||||
// Function-calling APIs reject anyOf/oneOf/allOf at the top level of
|
||||
// parameters; the runner and benchmark validate those rules themselves.
|
||||
for (const key of TOP_LEVEL_COMBINATORS) delete tool.parameters?.[key];
|
||||
return tool;
|
||||
});
|
||||
}
|
||||
|
||||
const TOP_LEVEL_COMBINATORS = ['anyOf', 'oneOf', 'allOf'];
|
||||
|
||||
function describe(schema, metadata, allowDescription = true) {
|
||||
if (!metadata || typeof metadata !== 'object' || Array.isArray(metadata))
|
||||
throw new TypeError('Descriptions must be an object');
|
||||
|
||||
Reference in new issue
Block a user