Skip to content
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 18 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,23 +194,24 @@ documentation, see the [Workflow Generator README](./osa_tool/operations/codebas

### Configuration

| Flag | Description | Default |
|----------------------|-------------------------------------------------------------------------------------|--------------------------------|
| `-r`, `--repository` | URL of the GitHub/GitLab/Gitverse repository (**Mandatory**) | |
| `-b`, `--branch` | Branch name of the repository | Default branch |
| `-o`, `--output` | Path to the output directory | Current working directory |
| `--api` | LLM API service provider | `openai` |
| `--base-url` | URL of the provider compatible with API OpenAI | `https://openrouter.ai/api/v1` |
| `--model` | Specific LLM model to use | `gpt-3.5-turbo` |
| `--top_p` | Nucleus sampling probability | `0.95` |
| `--temperature` | Sampling temperature to use for the LLM output (0 = deterministic, 1 = creative). | `0.05` |
| `--max_tokens` | Maximum number of output tokens the model can generate in a single response | `4096` |
| `--context_window` | Total number of model context (Input + Output) | `16385` |
| `--attachment` | Path to a local PDF or .docx file, or a URL to a PDF resource | `None` |
| `-m`, `--mode` | Operation mode for repository processing: `basic`, `auto` (default), or `advanced`. | `auto` |
| `--delete-dir` | Enable deleting the downloaded repository after processing | `disabled` |
| `--no-fork` | Avoid create fork for target repository | `False` |
| `--no-pull-request` | Avoid create pull request for target repository | `False` |
| Flag | Description | Default |
|------------------------|-------------------------------------------------------------------------------------|--------------------------------|
| `-r`, `--repository` | URL of the GitHub/GitLab/Gitverse repository (**Mandatory**) | |
| `-b`, `--branch` | Branch name of the repository | Default branch |
| `-o`, `--output` | Path to the output directory | Current working directory |
| `--api` | LLM API service provider | `openai` |
| `--base-url` | URL of the provider compatible with API OpenAI | `https://openrouter.ai/api/v1` |
| `--model` | Specific LLM model to use | `gpt-3.5-turbo` |
| `--top_p` | Nucleus sampling probability | `0.95` |
| `--temperature` | Sampling temperature to use for the LLM output (0 = deterministic, 1 = creative). | `0.05` |
| `--max_tokens` | Maximum number of output tokens the model can generate in a single response | `4096` |
| `--context_window` | Total number of model context (Input + Output) | `16385` |
| `--attachment` | Path to a local PDF or .docx file, or a URL to a PDF resource | `None` |
| `-m`, `--mode` | Operation mode for repository processing: `basic`, `auto` (default), or `advanced`. | `auto` |
| `--delete-dir` | Enable deleting the downloaded repository after processing | `disabled` |
| `--no-fork` | Avoid create fork for target repository | `False` |
| `--no-pull-request` | Avoid create pull request for target repository | `False` |
| `--artefacts-language` | Language for report generation | `English` |

Also OSA supports custom configuration via TOML files. Use the `--config-file` option to specify a path to custom
configuration file. If no custom configuration file is provided, OSA will use the default configuration.
Expand Down
35 changes: 18 additions & 17 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,23 +157,24 @@ documentation, see the [GitHub Action Workflow Generator README](workflow-genera

### Configuration

| Flag | Description | Default |
|----------------------|-------------------------------------------------------------------------------------|-----------------------------|
| `-r`, `--repository` | URL of the GitHub/GitLab/Gitverse repository (**Mandatory**) | |
| `-b`, `--branch` | Branch name of the repository | Default branch |
| `-o`, `--output` | Path to the output directory | Current working directory |
| `--api` | LLM API service provider | `itmo` |
| `--base-url` | URL of the provider compatible with API OpenAI | `https://api.openai.com/v1` |
| `--model` | Specific LLM model to use | `gpt-3.5-turbo` |
| `--top_p` | Nucleus sampling probability | `0.95` |
| `--temperature` | Sampling temperature to use for the LLM output (0 = deterministic, 1 = creative). | `0.05` |
| `--max_tokens` | Maximum number of output tokens the model can generate in a single response | `4096` |
| `--context_window` | Total number of model context (Input + Output) | `16385` |
| `--attachment` | Path to a local PDF or .docx file, or a URL to a PDF resource | `None` |
| `-m`, `--mode` | Operation mode for repository processing: `basic`, `auto` (default), or `advanced`. | `auto` |
| `--delete-dir` | Enable deleting the downloaded repository after processing | `disabled` |
| `--no-fork` | Avoid create fork for target repository | `False` |
| `--no-pull-request` | Avoid create pull request for target repository | `False` |
| Flag | Description | Default |
|------------------------|-------------------------------------------------------------------------------------|-----------------------------|
| `-r`, `--repository` | URL of the GitHub/GitLab/Gitverse repository (**Mandatory**) | |
| `-b`, `--branch` | Branch name of the repository | Default branch |
| `-o`, `--output` | Path to the output directory | Current working directory |
| `--api` | LLM API service provider | `itmo` |
| `--base-url` | URL of the provider compatible with API OpenAI | `https://api.openai.com/v1` |
| `--model` | Specific LLM model to use | `gpt-3.5-turbo` |
| `--top_p` | Nucleus sampling probability | `0.95` |
| `--temperature` | Sampling temperature to use for the LLM output (0 = deterministic, 1 = creative). | `0.05` |
| `--max_tokens` | Maximum number of output tokens the model can generate in a single response | `4096` |
| `--context_window` | Total number of model context (Input + Output) | `16385` |
| `--attachment` | Path to a local PDF or .docx file, or a URL to a PDF resource | `None` |
| `-m`, `--mode` | Operation mode for repository processing: `basic`, `auto` (default), or `advanced`. | `auto` |
| `--delete-dir` | Enable deleting the downloaded repository after processing | `disabled` |
| `--no-fork` | Avoid create fork for target repository | `False` |
| `--no-pull-request` | Avoid create pull request for target repository | `False` |
| `--artefacts-language` | Language for reports generation | `English` |

To learn how to work with the interactive CLI and view descriptions of all available keys, visit
the [CLI usage guide](scheduler/index.md).
Expand Down
Binary file added osa_tool/assets/notosans-sc-black.ttf
Binary file not shown.
Binary file added osa_tool/assets/notosans-sc-bold.ttf
Binary file not shown.
Binary file added osa_tool/assets/notosans-sc.ttf
Binary file not shown.
5 changes: 4 additions & 1 deletion osa_tool/config/prompts/analysis.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ RULES:
- Be strictly factual about file presence
- Check for the presence of the directory with tests
- Prioritize 3 most critical recommendations

- Write text in values on {target_language}, except names of files, directories and packages and operation identifiers

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep constrained enum fields in English

For a non-English report, this new rule tells the model to translate JSON values, but the readme Yes/No/Partial fields and documentation.tests_present are still validated against the English YesNoPartial enum. If the model follows the language instruction and emits localized values such as Да/Нет, TextGenerator.make_request() catches the validation failure and falls back to an all-Unknown report, so the prompt should explicitly exempt these constrained enum values from translation.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вот эта мне тоже кажется важной.

"""

after_report_summary_from_events_prompt = """
Expand All @@ -63,6 +63,7 @@ REQUIREMENTS:
- Keep it concise (about two short paragraphs)
- Do not use markdown
- Do not use bullet points or lists
- Write it on target language: {target_language}

OUTPUT:
Return ONLY JSON matching the system message schema.
Expand All @@ -81,6 +82,8 @@ REQUIREMENTS:
- Each performed operation must appear in exactly one block
- "tasks" must list operation names exactly as provided (strings)
- Do not invent operations
- Write descriptions on target language: {target_language}
- Use original task names, do not translate it

OUTPUT:
Return ONLY JSON matching the system message schema.
Expand Down
10 changes: 7 additions & 3 deletions osa_tool/config/settings/arguments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,16 @@ arguments:
aliases: [ "--validate-doc" ]
type: flag
description: "Check whether the experiments proposed in an attached documentation file can be reproduced using the selected repository."
artefacts_language:
aliases: [ "--artefacts-language" ]
type: str
description: "Generate reports on selected language"
Comment thread
DRMPN marked this conversation as resolved.
Outdated

settings:
use_single_model:
aliases: [ "--use-single-model" ]
type: flag
description: "Use the same model for all tasks (from default configuration)."
aliases: [ "--use-single-model" ]
type: flag
description: "Use the same model for all tasks (from default configuration)."

config_file:
aliases: [ "--config-file" ]
Expand Down
1 change: 1 addition & 0 deletions osa_tool/config/settings/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ validate_paper = false
validate_doc = false
incremental = false
target_files = []
artefacts_language = "English"

#Workflow Settings
[workflows]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@


class TextGenerator:
def __init__(self, config_manager: ConfigManager, metadata: RepositoryMetadata):
def __init__(
self, config_manager: ConfigManager, metadata: RepositoryMetadata, target_language: str = "English"
) -> None:
self.config_manager = config_manager
self.model_settings = self.config_manager.get_model_settings("general")
self.sourcerank = SourceRank(self.config_manager)
Expand All @@ -35,6 +37,7 @@ def __init__(self, config_manager: ConfigManager, metadata: RepositoryMetadata):
self.model_handler: ModelHandler = ModelHandlerFactory.build(self.model_settings)
self.repo_url = self.config_manager.get_git_settings().repository
self.base_path = os.path.join(os.getcwd(), parse_folder_name(self.repo_url))
self.target_language = target_language

def make_request(self) -> RepositoryReport:
"""
Expand All @@ -50,6 +53,7 @@ def make_request(self) -> RepositoryReport:
repository_tree=self.sourcerank.tree,
presence_files=self._extract_presence_files(),
readme_content=extract_readme_content(self.base_path),
target_language=self.target_language,
)

try:
Expand Down Expand Up @@ -98,13 +102,15 @@ def __init__(
config_manger: ConfigManager,
completed_tasks: list[tuple[str, bool]],
task_results: dict[str, dict] | None = None,
target_language: str = "English",
) -> None:
self.config_manager = config_manger
self.model_settings = self.config_manager.get_model_settings("general")
self.prompts = self.config_manager.get_prompts()
self.completed_tasks = completed_tasks
self.task_results = task_results or {}
self.model_handler: ModelHandler = ModelHandlerFactory.build(self.model_settings)
self.target_language = target_language

def make_request(self) -> AfterReport:
"""
Expand All @@ -123,6 +129,7 @@ def make_request(self) -> AfterReport:
summary_prompt = PromptBuilder.render(
self.prompts.get("analysis.after_report_summary_from_events_prompt"),
operations=operations_text,
target_language=self.target_language,
)
summary_obj: AfterReportSummary = self.model_handler.run_chain(
prompt=summary_prompt,
Expand All @@ -136,6 +143,7 @@ def make_request(self) -> AfterReport:
blocks_prompt = PromptBuilder.render(
self.prompts.get("analysis.after_report_blocks_from_events_prompt"),
operations=operations_text,
target_language=self.target_language,
)
blocks_plan: AfterReportBlocksPlan = self.model_handler.run_chain(
prompt=blocks_prompt,
Expand Down
Loading
Loading