Files
browser-use/browser_use
மனோஜ்குமார் பழனிச்சாமி 95009f7d95 Add runtime type check for llm in Agent init
Added a type check to ensure the llm argument is an instance of BaseChatModel in Agent's constructor, raising a ValueError otherwise. Also marked BaseChatModel as @runtime_checkable to support isinstance checks.
2025-07-19 13:54:12 +05:30
..
2025-07-15 14:17:06 +02:00
2025-07-10 18:51:56 -07:00
2025-07-11 18:14:03 +02:00
2025-07-04 17:29:22 +02:00
2025-07-16 02:23:49 +00:00
2025-07-18 23:03:40 -07:00
2025-03-28 18:11:36 -07:00
2025-07-09 22:27:22 +02:00
2024-11-06 18:18:00 +01:00
2025-07-08 03:16:22 -07:00

Codebase Structure

The code structure inspired by https://github.com/Netflix/dispatch.

Very good structure on how to make a scalable codebase is also in this repo.

Just a brief document about how we should structure our backend codebase.

Code Structure

src/
/<service name>/
models.py
services.py
prompts.py
views.py
utils.py
routers.py

    	/_<subservice name>/

Service.py

Always a single file, except if it becomes too long - more than ~500 lines, split it into _subservices

Views.py

Always split the views into two parts

# All
...

# Requests
...

# Responses
...

If too long → split into multiple files

Prompts.py

Single file; if too long → split into multiple files (one prompt per file or so)

Routers.py

Never split into more than one file