Gorilla (Patil et al., 2023) fine-tunes a model to call APIs and pairs it with a retriever that finds the relevant API documentation for each request. Retrieval keeps the model from inventing APIs that do not exist.
Implement retrieve_api(query, api_docs), returning the API whose description best overlaps the query.
Split the query and each description into word sets, count shared words, and keep the best API in order.
No results yet
Run your code to check it against the examples, or submit to run every test.