File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -289,6 +289,49 @@ class ReceiptInfo(BaseModel):
289
289
)
290
290
291
291
292
+ @app .command ()
293
+ def tool (
294
+ query : str = typer .Option (
295
+ "Please investigate troubleshooting cases for KABUTO." ,
296
+ "--query" ,
297
+ "-q" ,
298
+ help = "Query for chat" ,
299
+ ),
300
+ model : str = typer .Option (
301
+ "phi3:3.8b-mini-4k-instruct-q2_K" ,
302
+ "--model" ,
303
+ "-m" ,
304
+ help = "Model to use for Ollama" ,
305
+ ),
306
+ verbose : bool = typer .Option (
307
+ False ,
308
+ "--verbose" ,
309
+ "-v" ,
310
+ help = "Enable verbose output" ,
311
+ ),
312
+ ):
313
+ set_verbose_logging (verbose )
314
+
315
+ from template_langgraph .tools .common import get_default_tools
316
+
317
+ chat_model = OllamaWrapper (
318
+ settings = Settings (
319
+ ollama_model_chat = model ,
320
+ )
321
+ ).chat_model
322
+ response = chat_model .bind_tools (tools = get_default_tools ()).invoke (
323
+ input = [
324
+ query ,
325
+ ],
326
+ )
327
+ logger .info (
328
+ response .model_dump_json (
329
+ indent = 2 ,
330
+ exclude_none = True ,
331
+ )
332
+ )
333
+
334
+
292
335
if __name__ == "__main__" :
293
336
load_dotenv (
294
337
override = True ,
You can’t perform that action at this time.
0 commit comments