Converging Fog and OpenAI layers for Code Reusability #100
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
Problem
Currently, both the Fog and OpenAI LLM layers utilize the OpenAI API specification to interact with remote LLM inference environments. This results in overlapping implementations within the Swift client, leading to code duplication.
However, due to the differences in functionality between the Fog and OpenAI layers, it has not been justifiable to create a separate abstraction layer yet, as the possible code sharing would be rather low.
Solution
To improve maintainability and reduce redundancy, we should work towards a functional convergence of the Fog and OpenAI layers, particularly in terms of function calling capabilities. Function calling is currently only supported for the OpenAI layer, but with Ollama’s new tool support, the Fog layer should also integrate function calling capabilities.
By aligning both layers in terms of functionality, we can enable significant code sharing opportunities. Once this alignment is achieved, the duplicated components should be refactored into a shared internal target, allowing both layers to reuse common logic efficiently. This will improve maintainability, streamline future enhancements, and reduce the overall complexity of the Swift client implementation.
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: