arangodb_agent
langroid/agent/special/arangodb/arangodb_agent.py
ArangoChatAgent(config)
¶
Bases: ChatAgent
Source code in langroid/agent/special/arangodb/arangodb_agent.py
with_retry(func, max_retries=3, delay=1.0)
¶
Execute a function with retries on connection error
Source code in langroid/agent/special/arangodb/arangodb_agent.py
read_query(query, bind_vars=None)
¶
Execute a read query with connection retry.
Source code in langroid/agent/special/arangodb/arangodb_agent.py
write_query(query, bind_vars=None)
¶
Execute a write query with connection retry.
Source code in langroid/agent/special/arangodb/arangodb_agent.py
aql_retrieval_tool(msg)
¶
Handle AQL query for data retrieval
Source code in langroid/agent/special/arangodb/arangodb_agent.py
aql_creation_tool(msg)
¶
Handle AQL query for creating data
Source code in langroid/agent/special/arangodb/arangodb_agent.py
arango_schema_tool(msg)
¶
Get database schema. If collections=None, include all collections. If properties=False, show only connection info, else show all properties and example-docs.
Source code in langroid/agent/special/arangodb/arangodb_agent.py
389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 |
|
handle_message_fallback(msg)
¶
When LLM sends a no-tool msg, assume user is the intended recipient, and if in interactive mode, forward the msg to the user.
Source code in langroid/agent/special/arangodb/arangodb_agent.py
retry_query(e, query)
¶
Generate error message for failed AQL query