From the uDemy course on LLM engineering.
https://www.udemy.com/course/llm-engineering-master-ai-and-large-language-models
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
721 B
18 lines
721 B
from .builder import llm_builder |
|
|
|
|
|
class LLMService: |
|
def __init__(self, model_type, model_name, crawl_type): |
|
|
|
self.llm = llm_builder(model_type, model_name, crawl_type) |
|
|
|
async def generate_response(self, crawl_result, |
|
url, |
|
description, |
|
site_type |
|
): |
|
async for response_chunk in self.llm.generate(content=crawl_result, |
|
url=url, description=description, |
|
site_type=site_type |
|
): |
|
yield response_chunk
|
|
|