Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: cli test prompt #760

Merged
merged 11 commits into from
Mar 21, 2024
Merged

feat: cli test prompt #760

merged 11 commits into from
Mar 21, 2024

Conversation

venjiang
Copy link
Contributor

@venjiang venjiang commented Mar 19, 2024

Description

Used to test ai sfn.

Usage

$ yomo test-prompt -h

Test LLM prompt

Usage:
  yomo test-prompt [flags]

Aliases:
  test-prompt, p

Flags:
  -a, --ai-server string       LLM API server address (default "http://localhost:8000")
  -h, --help                   help for test-prompt
      --sfn strings            sfn source directory
  -s, --system-prompt string   system prompt (default "You are a very helpful assistant. Your job is to choose the best possible action to solve the user question or task. Don't make assumptions about what values to plug into functions. Ask for clarification if a user request is ambiguous. If you don't know the answer, stop the conversation by saying \"no func call\"")
  -u, --user-prompt string     user prompt

Test llm-sfn-get-weather

$ yomo p --sfn ./llm-sfn-get-weather -u "What's the difference between the weather in Beijing and New York?"
ℹ️   --------------------------------------------------------
ℹ️   Run AI SFN on directory: .
ℹ️   Register AI function success
ℹ️   Invoke LLM API "http://localhost:8000/invoke"
ℹ️   >> LLM API Request
ℹ️   Messages:
ℹ️       System: You are a very helpful assistant. Your job is to choose the best possible action to solve the user question or task. Don't make assumptions about what values to plug into functions. Ask for clarification if a user request is ambiguous.
ℹ️       User: What's the difference between the weather in Beijing and New York?
ℹ️   << LLM API Response
ℹ️   Invoke functions[2]:
ℹ️       [call_LUD1TeeQhnh7DgOpEWBPEvub] tag: 17, name: get-weather, arguments: {"city_name": "Beijing"}, result: [Beijing] temperature: 25°C
ℹ️       [call_Ml5GMJNoJflFvloAIVFfn9eo] tag: 17, name: get-weather, arguments: {"city_name": "New York"}, result: [New York] temperature: 30°C
ℹ️   Finish Reason: stop
ℹ️   Content: The current temperature in Beijing is 25°C, while the temperature in New York is 30°C. This means that New York is currently 5°C warmer than Beijing.

@venjiang venjiang requested a review from woorui as a code owner March 19, 2024 08:05
Copy link

vercel bot commented Mar 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
yomo ⬜️ Ignored (Inspect) Visit Preview Mar 21, 2024 3:46pm

@venjiang venjiang self-assigned this Mar 19, 2024
Copy link

codecov bot commented Mar 19, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 64.80%. Comparing base (2372021) to head (597e359).
Report is 2 commits behind head on master.

❗ Current head 597e359 differs from pull request most recent head d132ba3. Consider uploading reports for the commit d132ba3 to get more accurate results

Files Patch % Lines
pkg/bridge/ai/provider/gemini/provider.go 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #760      +/-   ##
==========================================
+ Coverage   64.59%   64.80%   +0.20%     
==========================================
  Files          43       43              
  Lines        2497     2506       +9     
==========================================
+ Hits         1613     1624      +11     
+ Misses        770      768       -2     
  Partials      114      114              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fanweixiao fanweixiao merged commit 8b24008 into master Mar 21, 2024
5 checks passed
@fanweixiao fanweixiao deleted the feat/cli-test-prompt branch March 21, 2024 15:48
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.

None yet

2 participants