Skip to content

Commit

Permalink
Adapt latest changes for agentqna
Browse files Browse the repository at this point in the history
Use stream to follow OpenAI's API.
Rename the image name from agent-langchain to agent.
Fix test input

Signed-off-by: Dolpher Du <[email protected]>
  • Loading branch information
yongfengdu committed Jan 15, 2025
1 parent 7b35326 commit 5fb0e50
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 25 deletions.
16 changes: 2 additions & 14 deletions helm-charts/agentqna/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,14 @@ worker:
toolPath: "/mnt/tools"
service:
port: 9095
image:
repository: opea/agent-langchain
# Uncomment the following line to set desired image pull policy if needed, as one of Always, IfNotPresent, Never.
# pullPolicy: ""
# Overrides the image tag whose default is the chart appVersion.
tag: "latest"
strategy: rag_agent_llama
recursion_limit: "12"
llm_engine: tgi
llm_endpoint_url: ""
model: "meta-llama/Meta-Llama-3.1-70B-Instruct"
temperature: "0.01"
max_new_tokens: "4096"
streaming: "false"
stream: "false"
tools: "/home/user/tools/worker_agent_tools.yaml"
require_human_feedback: "false"
RETRIEVAL_TOOL_URL: ""
Expand All @@ -83,20 +77,14 @@ supervisor:
toolPath: "/mnt/tools"
service:
port: 9090
image:
repository: opea/agent-langchain
# Uncomment the following line to set desired image pull policy if needed, as one of Always, IfNotPresent, Never.
# pullPolicy: ""
# Overrides the image tag whose default is the chart appVersion.
tag: "latest"
strategy: react_llama
recursion_limit: 10
llm_engine: tgi
llm_endpoint_url: ""
model: "meta-llama/Meta-Llama-3.1-70B-Instruct"
temperature: "0.01"
max_new_tokens: "4096"
streaming: "false"
stream: "false"
tools: /home/user/tools/supervisor_agent_tools.yaml
require_human_feedback: false
CRAG_SERVER: ""
Expand Down
14 changes: 7 additions & 7 deletions helm-charts/common/agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ curl http://localhost:9090/v1/chat/completions \

For global options, see Global Options.

| Key | Type | Default | Description |
| ------------------------------- | ------ | ------------------------ | ------------------------------- |
| global.HUGGINGFACEHUB_API_TOKEN | string | `""` | Your own Hugging Face API token |
| image.repository | string | `"opea/agent-langchain"` | |
| service.port | string | `"9090"` | |
| llm_endpoint_url | string | `""` | LLM endpoint |
| global.monitoring | bop; | false | Service usage metrics |
| Key | Type | Default | Description |
| ------------------------------- | ------ | -------------- | ------------------------------- |
| global.HUGGINGFACEHUB_API_TOKEN | string | `""` | Your own Hugging Face API token |
| image.repository | string | `"opea/agent"` | |
| service.port | string | `"9090"` | |
| llm_endpoint_url | string | `""` | LLM endpoint |
| global.monitoring | bop; | false | Service usage metrics |
4 changes: 2 additions & 2 deletions helm-charts/common/agent/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ data:
{{- if .Values.model }}
model: {{ .Values.model | quote }}
{{- end }}
{{- if .Values.streaming }}
streaming: {{ .Values.streaming | quote }}
{{- if .Values.stream }}
stream: {{ .Values.stream | quote }}
{{- end }}
{{- if .Values.temperature }}
temperature: {{ .Values.temperature | quote }}
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/common/agent/templates/tests/test-pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
curl http://{{ include "agent.fullname" . }}:{{ .Values.service.port }}/v1/chat/completions -sS --fail-with-body \
-X POST \
-H 'Content-Type: application/json' \
-d '{"query":"What is OPEA?"}' && break;
-d '{"messages":"What is OPEA?", "stream":"true"}' && break;
curlcode=$?
if [[ $curlcode -eq 7 ]]; then sleep 10; else echo "curl failed with code $curlcode"; exit 1; fi;
done;
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/common/agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ require_human_feedback: "false"
LOGFLAG: "True"

image:
repository: opea/agent-langchain
repository: opea/agent
# Uncomment the following line to set desired image pull policy if needed, as one of Always, IfNotPresent, Never.
# pullPolicy: ""
# Overrides the image tag whose default is the chart appVersion.
Expand Down

0 comments on commit 5fb0e50

Please sign in to comment.