Go语言封装的动态链接库
Go to file
Fromsko 811bf86e4d 增加源文件 2024-01-03 22:37:41 +08:00
gocode 增加源文件 2024-01-03 22:37:41 +08:00
pycode 增加源文件 2024-01-03 22:36:06 +08:00
.gitignore Initial commit 2024-01-03 14:28:35 +00:00
LICENSE Initial commit 2024-01-03 14:28:35 +00:00
README.md 增加源文件 2024-01-03 22:36:06 +08:00
go.mod 增加源文件 2024-01-03 22:36:06 +08:00
go.sum 增加源文件 2024-01-03 22:36:06 +08:00

README.md

go-chat-dll

Go语言封装的动态链接库


设计

设计一个知识图谱分析程序,采用 Python+Go 实现。Python 采用 fastapi 来提供接口服务Go 作为插件提供给 PythonGo 编译为动态链接库 dll整个程序的设计如下使用 Go 编写的 dll对接 GPT 传入信息来获取输出)来作为文档内容转换为 json 格式内容的插件fastapi 提供两个接口一个用户登录注册一个上传文档。使用 python 实现适配器来对多种格式的文件进行统一转换,并将其转换的内容传入给 dll能够返回 json 格式的数据,已经处理完成的)最后将通过 python 的观察者模式来对处理整个工作流,如果已经完成任务则采用 ws 发送完成标志,如果在哪一步出现了问题则将那一步的错误信息返回出去进行重试(最多两次重试)
[
  "Task 1: Develop a Go DLL that interfaces with GPT to process input information and generate output in JSON format. The DLL should be able to handle document content conversion and provide the necessary functions for integration with the Python adapter.",
  "Task 2: Implement a Python adapter using fastapi to create two interfaces - one for user authentication and document uploading. The adapter should use an observer pattern to monitor the workflow, handle errors, and communicate with the Go DLL to obtain processed JSON data. Additionally, ensure compatibility with various file formats for unified conversion.",
  "Task 3: Set up a WebSocket (ws) communication system in Python to signal the completion of tasks or report errors during the workflow. Utilize the observer pattern to trigger the WebSocket updates based on the progress of the document processing. Implement error handling to allow for up to two retries in case of failures at any step in the workflow."
]