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.

t_agent.py 630B

12345678910111213141516171819
  1. from ragflow_sdk import RAGFlow,Agent
  2. from common import HOST_ADDRESS
  3. import pytest
  4. @pytest.mark.skip(reason="")
  5. def test_list_agents_with_success(get_api_key_fixture):
  6. API_KEY=get_api_key_fixture
  7. rag = RAGFlow(API_KEY,HOST_ADDRESS)
  8. rag.list_agents()
  9. @pytest.mark.skip(reason="")
  10. def test_converse_with_agent_with_success(get_api_key_fixture):
  11. API_KEY = "ragflow-BkOGNhYjIyN2JiODExZWY5MzVhMDI0Mm"
  12. agent_id = "ebfada2eb2bc11ef968a0242ac120006"
  13. rag = RAGFlow(API_KEY,HOST_ADDRESS)
  14. lang = "Chinese"
  15. file = "How is the weather tomorrow?"
  16. Agent.ask(agent_id=agent_id,rag=rag,lang=lang,file=file)