bstraehle commited on
Commit
5a04c98
·
1 Parent(s): 3462636

Update rag_llamaindex.py

Browse files
Files changed (1) hide show
  1. rag_llamaindex.py +4 -4
rag_llamaindex.py CHANGED
@@ -63,13 +63,13 @@ class LlamaIndexRAG(BaseRAG):
63
 
64
  def get_callback(self, token_counter):
65
  return ("Embedding Tokens: " +
66
- token_counter.total_embedding_token_count + "\n" +
67
  "LLM Prompt Tokens: " +
68
- token_counter.prompt_llm_token_count + "\n" +
69
  "LLM Completion Tokens: " +
70
- token_counter.completion_llm_token_count + "\n" +
71
  "Total LLM Token Count: " +
72
- token_counter.total_llm_token_count)
73
 
74
  def get_llm(self, config):
75
  return OpenAI(
 
63
 
64
  def get_callback(self, token_counter):
65
  return ("Embedding Tokens: " +
66
+ str(token_counter.total_embedding_token_count) + "\n" +
67
  "LLM Prompt Tokens: " +
68
+ str(token_counter.prompt_llm_token_count) + "\n" +
69
  "LLM Completion Tokens: " +
70
+ str(token_counter.completion_llm_token_count) + "\n" +
71
  "Total LLM Token Count: " +
72
+ str(token_counter.total_llm_token_count))
73
 
74
  def get_llm(self, config):
75
  return OpenAI(