Alanxtl commented on code in PR #825:
URL: https://github.com/apache/dubbo-go-samples/pull/825#discussion_r2030742939
##########
llm/go-client/frontend/main.go:
##########
@@ -46,9 +47,19 @@ func main() {
}
// init Dubbo
- cli, err := client.NewClient(
- client.WithClientURL("tri://127.0.0.1:20000"),
+ ins, err := dubbo.NewInstance(
+ dubbo.WithName("dubbo_llm_client"),
+ dubbo.WithRegistry(
+ registry.WithNacos(),
+ registry.WithAddress("127.0.0.1:8848"),
Review Comment:
same
##########
llm/go-client/cmd/client.go:
##########
@@ -143,12 +144,21 @@ func main() {
currentCtxID = createContext()
- cli, err := client.NewClient(
- client.WithClientURL("tri://127.0.0.1:20000"),
+ ins, err := dubbo.NewInstance(
+ dubbo.WithName("dubbo_llm_client"),
+ dubbo.WithRegistry(
+ registry.WithNacos(),
+ registry.WithAddress("127.0.0.1:8848"),
Review Comment:
extract nacos url and service name to .env file and import it from
```github.com/apache/dubbo-go-samples/llm/config```
##########
llm/go-server/cmd/server.go:
##########
@@ -161,11 +161,23 @@ func (s *ChatServer) Chat(ctx context.Context, req
*chat.ChatRequest, stream cha
func main() {
- srv, err := server.NewServer(
- server.WithServerProtocol(
+ ins, err := dubbo.NewInstance(
+ dubbo.WithName("dubbo_llm_server"),
+ dubbo.WithRegistry(
+ registry.WithNacos(),
+ registry.WithAddress("127.0.0.1:8848"),
Review Comment:
same
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]