Skip to content

Implement direct LLM integration with Groq and Gemini providers#2

Open
Dev0907 wants to merge 2 commits into
smitngandhi:mainfrom
Dev0907:feature/devparikh-srs-generation
Open

Implement direct LLM integration with Groq and Gemini providers#2
Dev0907 wants to merge 2 commits into
smitngandhi:mainfrom
Dev0907:feature/devparikh-srs-generation

Conversation

@Dev0907

@Dev0907 Dev0907 commented Feb 5, 2026

Copy link
Copy Markdown
  • Added direct_llm.py for handling chat completions with Groq and Gemini APIs.
  • Introduced error handling for authentication and provider errors.
  • Implemented model selection logic with fallbacks for Groq.
  • Created utility functions for parsing JSON responses and managing API requests.
  • Developed llm_config.py to manage LLM provider configurations and model normalization.
  • Added prompting.py for safe variable substitution in prompt templates and prompt size reduction.
  • Need to check some final working there are issues due to model limit.
image

- Added `direct_llm.py` for handling chat completions with Groq and Gemini APIs.
- Introduced error handling for authentication and provider errors.
- Implemented model selection logic with fallbacks for Groq.
- Created utility functions for parsing JSON responses and managing API requests.
- Developed `llm_config.py` to manage LLM provider configurations and model normalization.
- Added `prompting.py` for safe variable substitution in prompt templates and prompt size reduction. Need to check some final working there are issues due to model limit.

@smitngandhi smitngandhi left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

AI enhance feature is really useful but please maintain the system design i created i mentioned inside main.py

Thanks

Comment thread srs_engine/main.py
except Exception as e:
raise _llm_error_to_http(e)

external_interfaces_section = clean_interface_diagrams(external_interfaces_section)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

main idea is to run first four agents parallely based on user_inputs and other two after that because it is based on the first output here all are running sequential which will not follow the design properly

<script src="{{ url_for('static', path='home.js') }}"></script>
</body>
</html> No newline at end of file
</html>

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This one here is a really a good idea

if not v or not v.strip():
raise ValueError("content cannot be empty")
return v.strip()

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

great schema

Comment thread srs_engine/main.py
return (raw or "").strip()


@app.post("/enhance_section", response_model=SectionEnhancementResponse)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

no mention of the section_enchancer_agent

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.

2 participants