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

feat(api): /ai/generate && /ai/generate-stream #52

Merged
merged 20 commits into from
Apr 8, 2024
Merged

feat(api): /ai/generate && /ai/generate-stream #52

merged 20 commits into from
Apr 8, 2024

Conversation

sudoskys
Copy link
Member

@sudoskys sudoskys commented Apr 8, 2024

No description provided.

Add support for /ai/generate-stream endpoint in the python sdk to interact with the NovelAI API service.
- Added `generate.py` for generating text using LLM model
- Added `generate_stream.py` for streaming text generation using LLM model
…ration functionality in NovelAI Python project
Added new classes for LLMStreamResp and LLMResp in generate_stream.py and generate.py files.
⚙️ refactor: Add constants for repetition penalty whitelist and bad words IDs

🔢 feat: Add enum class for TextLLMModel and PenStyle

🚀 feat: Add main module __init__.py for AI generation

📝 chore: Update comments and docstrings in __init__.py
Updating Params validation in generate_image module to ensure
that it is working correctly.
- Added new file generate_stream.py
- Implemented LLMStream class with request method
- Added build method to generate prompt
- Added necessary_headers and model_dump method
- Implemented retry logic for request method
ℹ️ refactor(utils): remove unused imports and organize imports
🔊 fix: update imports in server.py for voice generation functionality
…tream.py

Refactor loop_connect function to improve readability and efficiency.
@sudoskys sudoskys self-assigned this Apr 8, 2024
@sudoskys sudoskys added the enhancement New feature or request label Apr 8, 2024
- Remove JwtCredential and LoginCredential
- Update ApiCredential with proper session usage
from collections.abc import AsyncIterable
from typing import Optional, Union, List
Updated import order to follow PEP8 guidelines.
@sudoskys sudoskys merged commit dc35edb into main Apr 8, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant