Skip to content

Enable direct Web Search for AI chat#36

Merged
Payel-git-ol merged 2 commits into
Payel-git-ol:masterfrom
konard:issue-35-3aa024e2f5f5
May 31, 2026
Merged

Enable direct Web Search for AI chat#36
Payel-git-ol merged 2 commits into
Payel-git-ol:masterfrom
konard:issue-35-3aa024e2f5f5

Conversation

@konard

@konard konard commented May 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Expose a new run_web_search tool to AI chat for current rates, news, fiat/forex pairs, and other non-tracked topics.
  • Route the chat tool through the existing Tradefast.search() server-side web search path with a bounded result limit.
  • Add prompt guidance and README documentation so the assistant searches before refusing unsupported pairs.

Reproduction

  • In normal AI chat, ask for a current non-tracked rate such as rub/usd rate.
  • Before this change, the chat request did not advertise any direct web-search tool, so the assistant could only answer from static Tradefast context or ask the user to use configured crypto analysis.

Tests

  • npm test -- tests/cli.test.tsx -t "lets AI chat" (fails before the fix, passes after)
  • npm run typecheck
  • npm test
  • npm run build

Fixes #35

konard added 2 commits May 31, 2026 09:25
Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: Payel-git-ol#35
@konard konard changed the title [WIP] We need to improve web search for chat with AI. Enable direct Web Search for AI chat May 31, 2026
@konard konard marked this pull request as ready for review May 31, 2026 09:33
@konard

konard commented May 31, 2026

Copy link
Copy Markdown
Contributor Author

Working session summary

Implemented and pushed the fix.

PR: #36

What changed:

  • Added run_web_search as an AI chat tool.
  • Wired it to existing Tradefast.search() so normal chat can search the internet directly.
  • Updated the Russian system prompt to search before refusing fiat/forex/current-info questions.
  • Added a regression test for rub/usd rate style chat.
  • Updated README AI chat tools docs.
  • Removed the placeholder .gitkeep.

Verification:

  • npm test -- tests/cli.test.tsx -t "lets AI chat" passed
  • npm run typecheck passed
  • npm test passed: 147 tests
  • npm run build passed
  • GitHub CI build-and-test passed on commit df179c3

PR #36 is marked ready for review, and the working tree is clean.


This summary was automatically extracted from the AI working session output.

@konard

konard commented May 31, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Model: GPT-5.5
  • Provider: OpenAI
  • Public pricing estimate: $5.531475

📊 Context and tokens usage:

  • 125.5K / 1.1M (12%) input tokens, 17.7K / 128K (14%) output tokens

Total: (125.5K + 3.5M cached) input tokens, 17.7K output tokens, $5.531475 cost

🤖 Models used:

  • Tool: OpenAI Codex
  • Requested: gpt-5.5
  • Model: GPT-5.5 (gpt-5.5)

📎 Log file uploaded as Gist (23886KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@Payel-git-ol Payel-git-ol merged commit 77b1eb2 into Payel-git-ol:master May 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

We need to improve web search for chat with AI.

2 participants