Primera fase: se construyen las funciones para las primeras 12 preguntas
This commit is contained in:
17
prueba_llm.py
Normal file
17
prueba_llm.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# from Extraction.llm.context import LLMContext
|
||||
# from Extraction.llm.config import LLMConfig
|
||||
|
||||
from llm.context import LLMContext
|
||||
from llm.config import LLMConfig
|
||||
|
||||
# Opción 1: Usando el método factory
|
||||
context = LLMContext()
|
||||
config = LLMConfig(
|
||||
provider="anthropic", model_name="claude-haiku-4-5"
|
||||
) # Ya viene con o4-mini
|
||||
context.set_strategy(config)
|
||||
llm = context.get_llm()
|
||||
|
||||
pregunta = "¿Cuál es el mejor modelo de lenguaje?"
|
||||
respuesta = llm.invoke(pregunta)
|
||||
print(respuesta)
|
||||
Reference in New Issue
Block a user