Newly Created Agent Speaks Chinese
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 3.1k
- Forks
- 651
- Avg merge
- 15h 2m
- Merged PRs (30d)
- 36
Description
LlamaSharp config from appsettings.json
"LlamaSharp": {
"Interactive": true,
"ModelDir": "C:\\Models\\TheBloke\\CodeLlama-7B-GGUF",
"DefaultModel": "codellama-7b.Q5_K_M.gguf",
"MaxContextLength": 1024,
"NumberOfGpuLayer": 20
},
LLM Provider for LlamaSharp:
{
"Provider": "llama-sharp",
"Models": [
{
"Name": "codellama-7b.Q5_K_M.gguf",
"Type": "chat"
}
]
}
Agent configuration:
{
"id": "ddf46fa4-5686-408a-a574-b3da43f3ed99",
"name": "test-agent",
"description": "generic agent to test chat functionality using locally installed LLM",
"instruction": "",
"templates": [],
"functions": [],
"responses": [],
"samples": [],
"is_public": false,
"is_router": false,
"allow_routing": false,
"disabled": false,
"icon_url": null,
"profiles": [],
"routing_rules": [],
"llm_config": {
"is_inherit": true,
"provider": "llama-sharp",
"model": "codellama-7b.Q5_K_M.gguf"
},
"plugin": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "BotSharp",
"description": null,
"assembly": "BotSharp.Core",
"icon_url": null,
"agent_ids": [
"ddf46fa4-5686-408a-a574-b3da43f3ed99"
],
"enabled": true,
"menus": null
},
"created_datetime": "2024-01-15T17:19:45.2410911Z",
"updated_datetime": "2024-01-15T17:19:45.2410912Z"
}
Message Sent:
{
"text": "hello world"
}
To allow CPU initialization, 'LlamaSharp.Backend.Cpu' is referenced.
Response:
你好,我是小芭。您可以对我说“小芭,帮我做什么”,我会尽力帮助您。
Rough translation:
Hello, I am Xiaoba. You can say to me "Xiaoba, what can I do for you?" and I will try my best to help you.
This response comes back for everything. The model have been tested in LM studio and doesn't appear to have any affinity for Chinese, What am I doing wrong?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the LlamaSharp settings in appsettings.json and the agent's llama-sharp provider configuration, then reproduce the response using the supplied "hello world" message. Check the interaction between the selected CodeLlama model, inherited LLM configuration, and LlamaSharp.Backend.Cpu initialization. Done means the agent no longer returns the same unexpected Chinese response for every message, or the cause and required configuration are documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- ai
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100