/
githubmirror
/
babyagi
Обзор
Документация
Войти
/
githubmirror
/
babyagi
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
examples/trigger_example.py
21 строка
594 B
Yohei Nakajima
Initial commit: Replace babyagi with babyagi 2
30 сен 2024, 11:31
30 сен 2024, 11:31
45f4809
Код
Авторство
О чём код?
import babyagi @babyagi.register_function() def function_a(): print("Result from function A") return "Result from function A" @babyagi.register_function(triggers=['function_a']) def function_b(input_data): print(f"Function B triggered with input: {input_data}") return f"Function B triggered with input: {input_data}" function_a() @app.route('/') def home(): return f"Welcome to the main app. Visit <a href=\"/dashboard\">/dashboard</a> for BabyAGI dashboard." if __name__ == "__main__": app = babyagi.create_app('/dashboard') app.run(host='0.0.0.0', port=8080)