fetchai / docs

Fetch.ai documentation for AI Agents, AI Engine, Fetch Network and more.
https://www.fetch.ai/docs
Apache License 2.0
6 stars 5 forks source link

AI Enginer Chat API Examples not working #934

Closed tanaygodse closed 1 month ago

tanaygodse commented 1 month ago

Prerequisites

Category

Technical Bug (unexpected behavior)

Expected Behavior / Content

Examples should work on documentation website and using curl or postman.

Observed Behavior / Content

The examples on the website currently do not execute.

Another issue is if we try to use curl commands or Postman, on our machine: The below command works: curl 'https://agentverse.ai/v1beta1/engine/chat/sessions' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data-raw '{"requestedModel":"talkative-01","email":"", "functionGroup":"523a7194-214f-48fd-b5be-b0e953cc35a3"}'

However, the example data is: curl 'https://agentverse.ai/v1beta1/engine/chat/sessions' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data-raw '{"requestedModel":"talkative-01","email":"", "functionGroup":"ef6937d9-c086-4785-8bb1-748680821714"}

The above curl with the example does not work.

The reason is the functionGroup.

Kindly update the functionGroup to a working value.

To avoid this issue in the future, maybe asking the user to do a GET query for list of the available functionGroups can be mentioned in the documentation, I can see something for that here: https://github.com/fetchai/ai-engine-sdk-python/blob/e2b6c5435c051e21be67d0f572e55df14906ff50/ai_engine_sdk/client.py#L283

Quick fix would be to just update the functionGroup value in the examples.

Kindly do the needful.

To Reproduce

No response

Environment Details (Optional)

No response

Failure Logs (Optional)

No response

Additional Information (Optional)

No response