@Override
	public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
		try {
			Map<String, ChatGPTJavaFunction> functions = GPTFunctionUtils.extractFunctions(bean.getClass());
			if (!functions.isEmpty()) {
				log.info("found {} functions on bean name {} with class {}", functions.size(), beanName,
						bean.getClass().getName());
				for (Map.Entry<String, ChatGPTJavaFunction> entry : functions.entrySet()) {
					ChatGPTJavaFunction jsonSchemaFunction = entry.getValue();
					jsonSchemaFunction.setTarget(bean);
					String functionName = entry.getKey();
					this.allJsonSchemaFunctions.put(functionName, jsonSchemaFunction);
					this.allChatFunctions.put(functionName, jsonSchemaFunction.toChatFunction());
				}
			}
		} //
		catch (Exception e) {
			throw new RuntimeException(e);
		}
		return bean;
	}
Repository for all GPT callback functions.

@author Josh Long
src/main/java/org/mvnsearch/chatgpt/spring/service/GPTFunctionRegistry.java