Skip to content

Commit 0c2f367

Browse files
authored
Merge pull request #83 from ovh/release/0.1.6
release 0.1.6
2 parents 9442a10 + d6f0d5f commit 0c2f367

File tree

8 files changed

+21
-26
lines changed

8 files changed

+21
-26
lines changed

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ curl -fsSL https://raw.githubusercontent.com/ovh/shai/main/install.sh | sh
1616

1717
the `shai` binary will be installed in `$HOME/.local/bin`
1818

19-
### install ``unstable`` version
19+
### install ``nightly`` version
2020

2121
Install the last [``unstable``](https://github.com/ovh/shai/releases/tag/unstable) version with the following command:
2222

@@ -37,10 +37,6 @@ shai auth
3737

3838
![shai auth](./docs/assets/auth.gif)
3939

40-
## Project context file
41-
42-
You can create a `SHAI.md` file at the root of your project containing any information you want Shai to know about the project (architecture, build steps, important directories, etc.). Shai will automatically load this file as additional context.
43-
4440
Once you have a provider set up, you can run shai:
4541

4642
```
@@ -75,6 +71,12 @@ echo "make me a hello world in main.py" | shai --trace | shai "now run it!"
7571

7672
![shai headless](./docs/assets/shai-chain.gif)
7773

74+
75+
## Project context file
76+
77+
You can create a `SHAI.md` file at the root of your project containing any information you want Shai to know about the project (architecture, build steps, important directories, etc.). Shai will automatically load this file as additional context.
78+
79+
7880
## Custom Agent (with MCP)
7981

8082
Instead of a single global configuration, you can create custom agent in a separate configuration.

shai-cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "shai"
3-
version = "0.1.5"
3+
version = "0.1.6"
44
edition = "2021"
55

66

shai-core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "shai-core"
3-
version = "0.1.5"
3+
version = "0.1.6"
44
edition = "2021"
55

66
[dependencies]

shai-core/src/runners/coder/coder.rs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -79,19 +79,11 @@ impl Brain for CoderBrain {
7979
.map_err(|e| AgentError::LlmError(e.to_string()))?;
8080

8181
// Extract token usage information
82-
let token_usage = if let Some(usage) = &brain_decision.usage {
82+
let token_usage = brain_decision.usage.as_ref().map(|usage| {
8383
let input = usage.prompt_tokens.unwrap_or(0);
8484
let output = usage.completion_tokens.unwrap_or(0);
85-
debug!(target: "brain::coder::tokens",
86-
input_tokens = input,
87-
output_tokens = output,
88-
total_tokens = usage.total_tokens,
89-
"Token usage for LLM call"
90-
);
91-
Some((input, output))
92-
} else {
93-
None
94-
};
85+
(input, output)
86+
});
9587

9688
// stop here if there's no other tool calls
9789
let message = brain_decision.choices.into_iter().next().unwrap().message;

shai-core/src/runners/coder/prompt.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,9 @@ pub fn render_system_prompt_template(template: &str) -> String {
151151
let content = SHAI_CONTENT.get_or_init(|| fs::read_to_string("SHAI.md").unwrap_or_default());
152152

153153
if !content.is_empty() {
154-
result = result.replace("{{SHAI_PROMPT}}", SHAI_PROMPT);
155-
result = result.replace("{{SHAI}}", content);
154+
result = result
155+
.replace("{{SHAI_PROMPT}}", SHAI_PROMPT)
156+
.replace("{{SHAI}}", content);
156157
} else {
157158
result = result.replace("{{SHAI_PROMPT}}", "");
158159
}

shai-llm/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "shai-llm"
3-
version = "0.1.5"
3+
version = "0.1.6"
44
edition = "2021"
55

66
[dependencies]

shai-macros/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "shai-macros"
3-
version = "0.1.5"
3+
version = "0.1.6"
44
edition = "2021"
55

66
[lib]

0 commit comments

Comments
 (0)