From 0ae1f34232235d2c4369e71b1767f6501f932af0 Mon Sep 17 00:00:00 2001 From: Phodal Huang Date: Fri, 21 Jul 2023 23:00:40 +0800 Subject: [PATCH] docs: udpate samples --- src/develop-llm-app-best-practise.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/develop-llm-app-best-practise.md b/src/develop-llm-app-best-practise.md index 328e163..a725093 100644 --- a/src/develop-llm-app-best-practise.md +++ b/src/develop-llm-app-best-practise.md @@ -310,6 +310,8 @@ await fetch("/api/action/tooling", { ### 服务端实现转发: Java + Spring +WebFlux + Spring Boot + ```java @RestController public class ChatController { @@ -333,6 +335,8 @@ public class ChatController { ### 服务端转发:Python +FastAPI + OpenAI + ```python app = FastAPI() @@ -363,12 +367,7 @@ def generate_reply_stream(input_data: ChatInput): temperature=temperature, max_tokens=max_tokens, n=max_responses, - top_p=1, - frequency_penalty=0, - presence_penalty=0, messages=[ - {"role": "system", - "content": "You are an expert creative marketer. Create a campaign for the brand the user enters."}, {"role": "user", "content": prompt}, ], stream=True,