opea-project / GenAIInfra

Containerization and cloud native suite for OPEA
Apache License 2.0
16 stars 21 forks source link

GMC failed to map the request to llm-service with endpoint v1/chat/completion #130

Open KfreeZ opened 4 days ago

KfreeZ commented 4 days ago

When the request curl $accessUrl -X POST -d '{"language_from": "Golang","language_to": "Python","source_code": "package main\n\nimport \"fmt\"\nfunc main() {\n fmt.Println(\"Hello, World!\");\n}"}' -H 'Content-Type: application/json' is sent to GMC router service, it is routed this request to llm-service/v1/chat/completion by GMC's router service.

But the output is not expected as below:

{"detail":[{"type":"missing","loc":["body","query"],"msg":"Field required","input":{"language_from":"Golang","language_to":"Python","source_code":"package main\n\nimport \"fmt\"\nfunc main() {\n    fmt.Println(\"Hello, World!\");\n}"}}]}
KfreeZ commented 4 days ago

@zhlsunshine @irisdingbj please be noted this issue, we need to solve this cc @daisy-ycguo

daisy-ycguo commented 1 day ago

codegen is also wrong

$ cat gmc_codegen.log
{"detail":[{"type":"missing","loc":["body","query"],"msg":"Field required","input":{"messages":"def print_hello_world():"}