Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev local api #8

Merged
merged 31 commits into from
Apr 15, 2024
Merged

Dev local api #8

merged 31 commits into from
Apr 15, 2024

Conversation

haonan-li
Copy link
Member

Change Log

  1. API Key Handling: Transitioned from creating key files via copying to dynamically reading all API keys from a YAML file, streamlining configuration processes.
  2. Unified Configuration Dictionary: Replaced platform-specific dictionaries with a unified dictionary that aligns with environmental variable naming conventions, enhancing consistency and maintainability.
  3. Model Switching: Introduced a --model parameter that allows switching between different models, currently supporting OpenAI and Anthropic.
  4. Modular Architecture: Restructured the codebase into one Base class file and individual class files for each model, enhancing modularity and clarity.
  5. Base Class Redefinition: Redefined the Base class to abstract asynchronous operations and other functionalities. Users customizing models need only override three functions.
  6. Prompt Switching: Added a --prompt parameter for switching between predefined prompts, initially supporting prompts for OpenAI and Anthropic.
  7. Prompt Definitions via YAML and JSON: Enabled prompt definitions using YAML and JSON, allowing prompts to be automatically read from corresponding YAML or JSON files when the prompt parameter ends with .yaml or .json.
  8. Search Engine Switching: Introduced a --retriever parameter to switch between different search engines, currently supporting Serper and Google.
  9. Webapp Frontend Optimization: Optimized the web application frontend to prevent duplicate requests during processing, including disabling the submit button after a click and displaying a timer during processing.
    10 Client Switching: introduce a --client parameter that allows switching between different client (chat API), currently support OpenAI compatible API (for local model and official model), and Anthropic chat API client.

@haonan-li haonan-li merged commit 804871e into main Apr 15, 2024
1 check passed
@haonan-li haonan-li deleted the dev-local-api branch April 15, 2024 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants