indexFunction method
Computes and caches embedding for a function.
Implementation
Future<void> indexFunction(String functionId, String code) async {
final encoding = _tokenizer.encode(code);
final embedding = await _runtime.getEmbedding(encoding.ids);
_embeddings[functionId] = embedding;
}